Commit Graph

54226 Commits

Author SHA1 Message Date
Lang Hames 48770eb61f Fixed call to wrong constructor.
llvm-svn: 89059
2009-11-17 07:19:50 +00:00
Owen Anderson 759d72dc8e Fix a race condition in the Timer class.
llvm-svn: 89056
2009-11-17 07:06:10 +00:00
Bill Wendling bc0020174b Refactor the code that creates the "dot-label" difference. This may be used in
more than one place. No intended functionality change.

llvm-svn: 89024
2009-11-17 01:23:53 +00:00
Jim Grosbach af1ad30a23 When moving a block for table jumps, make sure the prior block terminator
is analyzable so it can be updated. If it's not, be safe and don't move the
block.

llvm-svn: 89022
2009-11-17 01:21:04 +00:00
Jakob Stoklund Olesen 9f0d55d8d8 Enable -split-phi-edges by default
llvm-svn: 89021
2009-11-17 01:07:22 +00:00
Evan Cheng d33400e636 MOV64rm should be marked isReMaterializable.
llvm-svn: 89019
2009-11-17 00:55:55 +00:00
Dan Gohman 82e80019a5 Remove the optimizations that convert BRCOND and BR_CC into
unconditional branches or fallthroghes. Instcombine/SimplifyCFG
should be simplifying branches with known conditions.

This fixes some problems caused by these transformations not
updating the MachineBasicBlock CFG.

llvm-svn: 89017
2009-11-17 00:47:23 +00:00
Devang Patel 12144a2348 Remove debug info attached with an instruction.
llvm-svn: 89016
2009-11-17 00:47:06 +00:00
Jeffrey Yasskin 7c57c41d5f In GlobalVariable::setInitializer, assert that the initializer has the
right type.

llvm-svn: 89014
2009-11-17 00:43:13 +00:00
Evan Cheng ce28f6f478 A few more instructions that should be marked re-materializable.
llvm-svn: 89011
2009-11-17 00:23:22 +00:00
Jim Grosbach 0ad7efbace Convert to FileCheck
llvm-svn: 89007
2009-11-17 00:20:26 +00:00
Jim Grosbach 4781c3caf8 Convert to FileCheck
llvm-svn: 89002
2009-11-17 00:03:38 +00:00
Jim Grosbach 805d195649 Cleanup. Missed removing these when converting. Oops.
llvm-svn: 89001
2009-11-17 00:00:33 +00:00
Johnny Chen 18183b6d8e Set Rm bits of BX_RET to 0b1110 (R14); and set condition code bits of BRIND to
0b1110 (ALways).  This is so that the disassembler decoder can distinguish among
BX_RET, BRIND, and BXr9.

llvm-svn: 89000
2009-11-16 23:57:56 +00:00
Dan Gohman b43e1ff236 Fix this test - there don't appear to be any actual Reload Reuses
in this testcase.

llvm-svn: 88998
2009-11-16 23:49:55 +00:00
Dan Gohman 9dede3b383 Revert r87049, which was the workaround for the regression triggered
by the recent FixedStackPseudoSourceValue-related changes, now that
the specific bug that affected it is fixed, in r88954.

llvm-svn: 88997
2009-11-16 23:43:42 +00:00
Jeffrey Yasskin 0632b53bfe Revert the test from r88984. It relies on being able to mmap 16GB of
address space (though it only uses a small fraction of that), and the
buildbots disallow that.

Also add a comment to the Makefile's ulimit line warning future
developers that changing it won't work.

llvm-svn: 88994
2009-11-16 23:32:30 +00:00
Jim Grosbach 1deb0b9f53 Convert to FileCheck
llvm-svn: 88991
2009-11-16 23:19:29 +00:00
Dan Gohman 9b5eea30f7 Initialize the new AsmPrinterFlags field to 0, fixing uses of
uninitialized memory.

llvm-svn: 88985
2009-11-16 22:49:38 +00:00
Jeffrey Yasskin 10d3604a9e Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

llvm-svn: 88984
2009-11-16 22:41:33 +00:00
Daniel Dunbar 1aab2ded3a Don't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility of this is testing that we keep the examples up to date, I will just make the buildbots run with this flag.
llvm-svn: 88979
2009-11-16 22:38:00 +00:00
Daniel Dunbar 08d4ab9663 Add "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
disk space, and increasing battery lifetime. :)

llvm-svn: 88978
2009-11-16 22:37:52 +00:00
Eric Christopher dc679f88c8 Fix unused variables warnings.
llvm-svn: 88977
2009-11-16 22:34:32 +00:00
Evan Cheng f25ef4ffb0 - Check memoperand alignment instead of checking stack alignment. Most load / store folding instructions are not referencing spill stack slots.
- Mark MOVUPSrm re-materializable.

llvm-svn: 88974
2009-11-16 21:56:03 +00:00
Devang Patel f3d7c08e34 Revert r88939.
llvm-svn: 88973
2009-11-16 21:53:40 +00:00
David Greene a3ce7828b2 Fix an expensive-checks error.
The Mask and LHSMask may not be of the same size, so don't do the
transformation if they're different.

llvm-svn: 88972
2009-11-16 21:52:23 +00:00
Jim Grosbach 56ee15c162 Make the pass class name more explicit.
llvm-svn: 88964
2009-11-16 21:13:22 +00:00
Jim Grosbach 544b15cbc3 make pass name a bit more clear
llvm-svn: 88961
2009-11-16 21:03:58 +00:00
Dan Gohman f76945ff14 Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
llvm-svn: 88959
2009-11-16 20:45:50 +00:00
Dan Gohman 0bcda0d5bd Remove an unnecessary #include.
llvm-svn: 88957
2009-11-16 20:41:12 +00:00
Dan Gohman 93f529d514 Sink a #include <map> to where it's actually needed.
llvm-svn: 88956
2009-11-16 20:40:47 +00:00
Dan Gohman 4617f3e893 Make PseudoSourceValue's classof recognize
FixedStackPseudoSourceValueVal, to respect this isa relationship.

llvm-svn: 88954
2009-11-16 20:40:06 +00:00
Dan Gohman 6b3f32e6d7 Fix a typo in a comment.
llvm-svn: 88953
2009-11-16 20:35:59 +00:00
Jim Grosbach 9b32e22ad1 Convert to FileCheck
llvm-svn: 88947
2009-11-16 20:04:15 +00:00
Lang Hames 16f6b3e607 Added a testcase for PR5495.
llvm-svn: 88946
2009-11-16 20:03:13 +00:00
Rafael Espindola 65e9be6dc2 Add configure options for specifying where to look for libstdc++.
llvm-svn: 88943
2009-11-16 19:46:55 +00:00
Jim Grosbach 980d94164d Convert to FileCheck
llvm-svn: 88942
2009-11-16 19:46:46 +00:00
Bob Wilson 44724c4122 Fix a comment.
llvm-svn: 88940
2009-11-16 19:33:27 +00:00
Devang Patel 2ffd9935a1 Add VISIBILITY_HIDDEN marker.
llvm-svn: 88939
2009-11-16 19:20:48 +00:00
Jim Grosbach 9785e5914f Simplify thumb2 jump table adjustments. Remove unnecessary calculation and
usage of block sizes and offsets.

llvm-svn: 88935
2009-11-16 18:58:52 +00:00
Jim Grosbach 87b0f0d95c clarify comment
llvm-svn: 88933
2009-11-16 18:55:47 +00:00
Bob Wilson 1a8ea98b76 Fix some comments.
llvm-svn: 88932
2009-11-16 18:54:08 +00:00
Bob Wilson 3794ec2519 Whitespace: be consistent with pointer syntax.
llvm-svn: 88929
2009-11-16 18:08:46 +00:00
Bob Wilson 699f5b9a0a Clean up whitespace.
llvm-svn: 88927
2009-11-16 17:56:13 +00:00
Jim Grosbach c670bdc311 tbb opt off by default
llvm-svn: 88921
2009-11-16 17:24:45 +00:00
Jim Grosbach 9c148c2163 back off for a bit. tracking down weirdness
llvm-svn: 88919
2009-11-16 17:17:48 +00:00
Jim Grosbach 47d5e333ff Analyze has to be before checking the condition, obviously. Properly construct an iterator for prior.
llvm-svn: 88917
2009-11-16 17:10:56 +00:00
Douglas Gregor 16917aa19d Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs
llvm-svn: 88916
2009-11-16 16:56:48 +00:00
Duncan Sands 551861e7d9 Make sure that if anyone passes a name by accident for the isSigned
parameter of CreateIntCast then they get an error from the compiler
(or from the linker with a non-gcc compiler).  Another possibility
is to flip the order of the DestTy and isSigned parameters, since you
should then get a compiler warning if you try to use a char* for a
Type*.

llvm-svn: 88913
2009-11-16 15:28:17 +00:00
David Greene 25905c8336 Support spill comments.
Have the asm printer emit a comment if an instruction is a spill or
reload and have the spiller mark copies it introdues so the asm printer
can also annotate those.

llvm-svn: 88911
2009-11-16 15:12:23 +00:00