summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-01-24 15:30:20 +0100
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-01-24 15:30:20 +0100
commit51f0b930fbb8011c4cd44c1461b67018e643bdc9 (patch)
tree772ac63fb64fe64e4379dd901b0e97f08c437d9f /ir/ir
parent3f5234329d260277bdfb3f83ff92196bdc87470f (diff)
improved readability/code quality according to clang-tidy readability checks
resolved warnings for these checks: - readability-non-const-parameter - readability-avoid-const-params-in-decls - readability-named-parameter
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irarch.c6
-rw-r--r--ir/ir/iredges.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/ir/ir/irarch.c b/ir/ir/irarch.c
index 38f1dfa..6e4fe64 100644
--- a/ir/ir/irarch.c
+++ b/ir/ir/irarch.c
@@ -197,7 +197,7 @@ static unsigned char *value_to_condensed(mul_env *env, ir_tarval *tv, int *pr)
/**
* Calculate the gain when using the generalized complementary technique
*/
-static int calculate_gain(unsigned char *R, int r)
+static int calculate_gain(const unsigned char *R, int r)
{
int max_gain = 0;
int gain = 2 - 3 - R[0];
@@ -217,7 +217,7 @@ static int calculate_gain(unsigned char *R, int r)
/**
* Calculates the condensed complement of a given (R,r) tuple
*/
-static unsigned char *complement_condensed(mul_env *env, unsigned char *R,
+static unsigned char *complement_condensed(mul_env *env, const unsigned char *R,
int gain, int *prs)
{
unsigned char *value = OALLOCNZ(&env->obst, unsigned char, env->bits);
@@ -255,7 +255,7 @@ static unsigned char *complement_condensed(mul_env *env, unsigned char *R,
/**
* creates a tarval from a condensed representation.
*/
-static ir_tarval *condensed_to_value(mul_env *env, unsigned char *R, int r)
+static ir_tarval *condensed_to_value(mul_env *env, const unsigned char *R, int r)
{
ir_tarval *tv = get_mode_one(env->mode);
ir_tarval *res = NULL;
diff --git a/ir/ir/iredges.c b/ir/ir/iredges.c
index f0295a6..7756f7f 100644
--- a/ir/ir/iredges.c
+++ b/ir/ir/iredges.c
@@ -44,7 +44,7 @@ void ir_edgeset_init_size(ir_edgeset_t *self, size_t size);
#define hashset_destroy ir_edgeset_destroy
#define hashset_insert ir_edgeset_insert
#define hashset_remove ir_edgeset_remove
-ir_edge_t *ir_edgeset_find(const ir_edgeset_t *self, const ir_edge_t*);
+ir_edge_t *ir_edgeset_find(const ir_edgeset_t *self, const ir_edge_t* key);
#define hashset_find ir_edgeset_find
size_t ir_edgeset_size(const ir_edgeset_t *self);
#define hashset_size ir_edgeset_size