| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
into a range where it"... it causes bzip2 to be miscompiled by Clang.
Conflicts:
lib/CodeGen/MachineSink.cpp
llvm-svn: 106614
|
|
|
|
|
|
| |
situation.
llvm-svn: 106119
|
|
|
|
|
|
|
|
| |
will conflict with another live range. The place which creates this scenerio is
the code in X86 that lowers a select instruction by splitting the MBBs. This
eliminates the need to check from the bottom up in an MBB for live pregs.
llvm-svn: 106066
|
|
|
|
| |
llvm-svn: 105435
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
registers it defines then interfere with an existing preg live range.
For instance, if we had something like these machine instructions:
BB#0
... = imul ... EFLAGS<imp-def,dead>
test ..., EFLAGS<imp-def>
jcc BB#2 EFLAGS<imp-use>
BB#1
... ; fallthrough to BB#2
BB#2
... ; No code that defines EFLAGS
jcc ... EFLAGS<imp-use>
Machine sink will come along, see that imul implicitly defines EFLAGS, but
because it's "dead", it assumes that it can move imul into BB#2. But when it
does, imul's "dead" imp-def of EFLAGS is raised from the dead (a zombie) and
messes up the condition code for the jump (and pretty much anything else which
relies upon it being correct).
The solution is to know which pregs are live going into a basic block. However,
that information isn't calculated at this point. Nor does the LiveVariables pass
take into account non-allocatable physical registers. In lieu of this, we do a
*very* conservative pass through the basic block to determine if a preg is live
coming out of it.
llvm-svn: 105387
|
|
|
|
| |
llvm-svn: 105359
|
|
|
|
|
|
| |
when they move instructions.
llvm-svn: 103737
|
|
|
|
|
|
|
|
|
|
| |
MachineLoopInfo is already available when MachineSinking runs, so the check is
free.
There is no test case because it would require a critical edge into a loop, and
CodeGenPrepare splits those. This check is just to be extra careful.
llvm-svn: 101420
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it is desirable to sink instructions along a critical edge:
x = ...
if (a && b) ...
else use(x);
The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.
llvm-svn: 101165
|
|
|
|
| |
llvm-svn: 100455
|
|
|
|
| |
llvm-svn: 97765
|
|
|
|
| |
llvm-svn: 97578
|
|
|
|
|
|
|
|
|
| |
into TargetOpcodes.h. #include the new TargetOpcodes.h
into MachineInstr. Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the
codebase.
llvm-svn: 95687
|
|
|
|
| |
llvm-svn: 92593
|
|
|
|
|
|
| |
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
|
|
|
|
|
|
|
| |
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
|
|
|
|
| |
llvm-svn: 84504
|
|
|
|
| |
llvm-svn: 84503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
llvm-svn: 83687
|
|
|
|
|
|
|
|
|
| |
implementations with a new MachineInstr::isInvariantLoad, which uses
MachineMemOperands and is target-independent. This brings MachineLICM
and other functionality to targets which previously lacked an
isInvariantLoad implementation.
llvm-svn: 83475
|
|
|
|
|
|
|
| |
allocatable. Even if it doesn't appear to have any defs, it may latter
on after register allocation.
llvm-svn: 82834
|
|
|
|
|
|
|
|
| |
which have no defs anywhere in the function. In particular, this fixes sinking
of instructions that reference RIP on x86-64, which is currently being modeled
as a register.
llvm-svn: 82815
|
|
|
|
|
|
| |
and skipping the defs.
llvm-svn: 82811
|
|
|
|
|
|
| |
upgrading a few things to use raw_ostream
llvm-svn: 79811
|
|
|
|
| |
llvm-svn: 79755
|
|
|
|
| |
llvm-svn: 78139
|
|
|
|
| |
llvm-svn: 77754
|
|
|
|
|
|
|
|
|
|
|
| |
1. Sinking would crash when the first instruction of a block was
sunk due to iterator problems.
2. Instructions could be sunk to their current block, causing an
infinite loop.
This fixes PR3968
llvm-svn: 68787
|
|
|
|
| |
llvm-svn: 64582
|
|
|
|
|
|
| |
doesn't think it's safe. This works around PR1911.
llvm-svn: 63994
|
|
|
|
| |
llvm-svn: 61715
|
|
|
|
|
|
| |
isReg, etc., from isRegister, etc.
llvm-svn: 57006
|
|
|
|
|
|
|
|
|
| |
isImmediate(), isRegister(), and friends, to avoid confusion
about having two different names with the same meaning. I'm
not attached to the longer names, and would be ok with
changing to the shorter names if others prefer it.
llvm-svn: 56189
|
|
|
|
| |
llvm-svn: 55779
|
|
|
|
|
|
|
| |
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
|
|
|
|
| |
llvm-svn: 48311
|
|
|
|
| |
llvm-svn: 46930
|
|
|
|
|
|
|
|
|
| |
has no stores between the load and the end of block. This works
great and sinks hundreds of stores, but we can't turn it on because
machineinstrs don't have volatility information and we don't want to
sink volatile stores :(
llvm-svn: 45894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
both work right according to the new flags.
This removes the TII::isReallySideEffectFree predicate, and adds
TII::isInvariantLoad.
It removes NeverHasSideEffects+MayHaveSideEffects and adds
UnmodeledSideEffects as machine instr flags. Now the clients
can decide everything they need.
I think isRematerializable can be implemented in terms of the
flags we have now, though I will let others tackle that.
llvm-svn: 45843
|
|
|
|
| |
llvm-svn: 45841
|
|
|
|
|
|
| |
made better.
llvm-svn: 45625
|
|
|
|
|
|
| |
sinks almost nothing.
llvm-svn: 45617
|
|
|
|
| |
llvm-svn: 45614
|
|
--enable-sinking.
It is missing validity checks, so it is known broken. However, it is powerful enough
to compile this contrived code:
void test1(int C, double A, double B, double *P) {
double Tmp = A*A+B*B;
*P = C ? Tmp : A;
}
into:
_test1:
movsd 8(%esp), %xmm0
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movsd 16(%esp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test1:
movsd 16(%esp), %xmm0
mulsd %xmm0, %xmm0
movsd 8(%esp), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movapd %xmm2, %xmm1
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm1, (%eax)
ret
woo.
llvm-svn: 45570
|