search for: analyzeloadavail

Displaying 2 results from an estimated 2 matches for "analyzeloadavail".

2018 Apr 18
1
[RFC] Making GVN able to visit the same block more than once
...d end: %retptr = phi i32* [ %ptr1, %a ], [ %bphi, %b ] %ret = load i32, i32* %retptr, align 4 ret i32 %ret } Here this load of %ret is fully redundant: on every path from entry to end there is a load which already has the value that %ret would load. Currently in GVN after it does AnalyzeLoadAvailability what we have is: * %val1 is available in %entry (for the entry->a->end path) * %bphi is unknown in %b (we tried to visit %entry for %ptr3 but failed because we already visited it for %ptr1) What then happens is: * We have one available and one unavailable value, so PRE is done...
2016 Apr 18
2
Different index types in GEPs -> non-aliasing?
...; preds = %0 ret i16 0 } Note the "undef" in the branch which GVN put there: GVN iteration: 0 GVN removed: %_tmp5 = load i16, i16* %_tmp4 GVN removed: %_tmp6 = icmp ne i16 undef, 98 When digging into why GVN does this, I found this little piece of code in GVN::AnalyzeLoadAvailability that triggers // Loading the allocation -> undef. if (isa<AllocaInst>(DepInst) || isMallocLikeFn(DepInst, TLI) || // Loading immediately after lifetime begin -> undef. isLifetimeStart(DepInst)) { Res = AvailableValue::get(UndefValue::get(LI->getType()...