Displaying 4 results from an estimated 4 matches for "csbb".
Did you mean:
cobb
2013 Aug 02
2
[LLVMdev] Missing optimization - constant parameter
...n purpose:
// Heuristics #1: Don't CSE "cheap" computation if the def is not local or in
// an immediate predecessor. We don't want to increase register pressure and
// end up causing other computation to be spilled.
if (MI->isAsCheapAsAMove()) {
MachineBasicBlock *CSBB = CSMI->getParent();
MachineBasicBlock *BB = MI->getParent();
if (CSBB != BB && !CSBB->isSuccessor(BB))
return false;
}
This code is older than the greedy register allocator. We could delete it if somebody is willing to check for regressions in the test suite.
I t...
2013 Aug 05
0
[LLVMdev] Missing optimization - constant parameter
...: Don't CSE "cheap" computation if the def is not local
> or in
> // an immediate predecessor. We don't want to increase register pressure
> and
> // end up causing other computation to be spilled.
> if (MI->isAsCheapAsAMove()) {
> MachineBasicBlock *CSBB = CSMI->getParent();
> MachineBasicBlock *BB = MI->getParent();
> if (CSBB != BB && !CSBB->isSuccessor(BB))
> return false;
> }
>
> This code is older than the greedy register allocator. We could delete it
> if somebody is willing to check for r...
2013 Aug 02
0
[LLVMdev] Missing optimization - constant parameter
> I expected that this optimization would be picked
> up in a cse, gvn, machine-cse or even peepholing pass.
>
> Comments?
At the LLVM IR level this is represented as
define i64 @caller() #0 {
entry:
store i64* @val, i64** @p, align 8, !tbaa !0
store i64 12345123400, i64* @val, align 8, !tbaa !3
%call = tail call i64 @xtr(i64 12345123400) #2
ret i64 %call
}
Which is
2013 Aug 02
2
[LLVMdev] Missing optimization - constant parameter
For the little C test program where a constant is stored in memory and
also
used as a parameter:
#include <stdint.h>
uint64_t val, *p;
extern uint64_t xtr( uint64_t);
uint64_t caller() {
uint64_t x;
p = &val;
x = 12345123400L;
*p = x;
return xtr(x);
}
clang (3.2, 3.3 and svn) generates the following X86 code (at -O3):
caller:
movq