search for: replacewithconstmap

Displaying 3 results from an estimated 3 matches for "replacewithconstmap".

2016 Jun 10
2
Early CSE clobbering llvm.assume
...is is the main way assume constants are propagated> bool GVN::processAssumeIntrinsic(IntrinsicInst *Inst) { ... // We can replace assume value with true, which covers cases like this: // call void @llvm.assume(i1 %cmp) // br i1 %cmp, label %bb1, label %bb2 ; will change %cmp to true ReplaceWithConstMap[V] = True; ... } ... bool GVN::processBlock(BasicBlock *BB) { ... // Clearing map before every BB because it can be used only for single BB. ReplaceWithConstMap.clear(); .... } So it's going to go through the rest of the bb, see nothing with %2, do nothing, and then next iteration, cl...
2016 Jun 10
3
Early CSE clobbering llvm.assume
...; bool GVN::processAssumeIntrinsic(IntrinsicInst *Inst) { >> ... >> >> // We can replace assume value with true, which covers cases like this: >> // call void @llvm.assume(i1 %cmp) >> // br i1 %cmp, label %bb1, label %bb2 ; will change %cmp to true >> ReplaceWithConstMap[V] = True; >> ... >> } >> >> ... >> bool GVN::processBlock(BasicBlock *BB) { >> ... >> // Clearing map before every BB because it can be used only for single >> BB. >> ReplaceWithConstMap.clear(); >> .... >> >> } >>...
2016 Jun 10
4
Early CSE clobbering llvm.assume
As of llvm 3.8, the early CSE pass seems to remove llvm.assume intrinsics. Is this the expected behavior? I've attached as small-ish example of this happening in my production code. $ opt -early-cse before-early-cse.ll -S > after-early-cse.ll Note the use of the assume intrinsic indicating that the loaded value %channels equals 3. In a later pass I replace the load instruction with