Displaying 3 results from an estimated 3 matches for "transformconstantexpr".
2011 Feb 15
3
[LLVMdev] How to use ConstantFoldConstantExpression?
...d from clang-generated code for triple arm-none-linux-gnueabi with added v32:32:32
const char* const TARGET_DATA_LAYOUT =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v128:128:128-a0:0:64-n32";
TargetData TD(TARGET_DATA_LAYOUT);
void transformConstantExpr(ConstantExpr* cop)
{
Constant* val = ConstantFoldConstantExpression(cop, &TD);
if (val != NULL)
{
errs() << "**" << *cop << " to \n--" << *val << "\n";
}
}
And this is the output i get, all constants should result in &q...
2011 Feb 15
0
[LLVMdev] How to use ConstantFoldConstantExpression?
...for triple arm-none-linux-gnueabi with added v32:32:32
> const char* const TARGET_DATA_LAYOUT =
> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v128:128:128-a0:0:64-n32";
>
> TargetData TD(TARGET_DATA_LAYOUT);
>
> void transformConstantExpr(ConstantExpr* cop)
> {
> Constant* val = ConstantFoldConstantExpression(cop, &TD);
> if (val != NULL)
> {
> errs() << "**" << *cop << " to \n--" << *val << "\n";
> }
> }
>
> And this is the out...
2011 Feb 15
2
[LLVMdev] How to use ConstantFoldConstantExpression?
...for triple arm-none-linux-gnueabi with added v32:32:32
> const char* const TARGET_DATA_LAYOUT =
> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v128:128:128-a0:0:64-n32";
>
> TargetData TD(TARGET_DATA_LAYOUT);
>
> void transformConstantExpr(ConstantExpr* cop)
> {
> Constant* val = ConstantFoldConstantExpression(cop, &TD);
> if (val != NULL)
> {
> errs() << "**" << *cop << " to \n--" << *val << "\n";
> }
> }
>
> And this is the out...