Commit Graph

38055 Commits

Author SHA1 Message Date
Dan Gohman
8c407d4596 ReuseFrameIndexVals is used in multiple files, so it can't be static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 17:34:58 +00:00
Dan Gohman
82bcd23693 EnablePPC64RS and EnablePPC32RS are used in multiple files, so they
can't be static.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 17:20:57 +00:00
Dan Gohman
b35798347e Fix a bunch of namespace polution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 17:08:50 +00:00
Dan Gohman
098406b42c Fix namespace polution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 16:23:27 +00:00
Dan Gohman
005752bbe7 Make getPredecessorWithUniqueSuccessorForBB return the unique successor
in addition to the predecessor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 16:19:08 +00:00
Gabor Greif
3181c50534 typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 15:14:46 +00:00
Gabor Greif
9ee1720811 back out r101364, as it trips the linux nightlybot on some clang C++ tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 12:46:56 +00:00
Gabor Greif
165dac08d1 rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 10:49:53 +00:00
Chris Lattner
e6987587d6 enhance the load/store narrowing optimization to handle a
tokenfactor in between the load/store.  This allows us to 
optimize test7 into:

_test7:                                 ## @test7
## BB#0:                                ## %entry
	movl	(%rdx), %eax
                                        ## kill: SIL<def> ESI<kill>
	movb	%sil, 5(%rdi)
	ret

instead of:

_test7:                                 ## @test7
## BB#0:                                ## %entry
	movl	4(%esp), %ecx
	movl	$-65281, %eax           ## imm = 0xFFFFFFFFFFFF00FF
	andl	4(%ecx), %eax
	movzbl	8(%esp), %edx
	shll	$8, %edx
	addl	%eax, %edx
	movl	12(%esp), %eax
	movl	(%eax), %eax
	movl	%edx, 4(%ecx)
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 06:10:49 +00:00
Chris Lattner
6dc868581b teach codegen to turn trunc(zextload) into load when possible.
This doesn't occur much at all, it only seems to formed in the case
when the trunc optimization kicks in due to phase ordering.  In that
case it is saves a few bytes on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 05:40:59 +00:00
Chris Lattner
efcddc3325 add a simple dag combine to replace trivial shl+lshr with
and.  This happens with the store->load narrowing stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 05:28:43 +00:00
Chris Lattner
2392ae7d73 Implement rdar://7860110 (also in target/readme.txt) narrowing
a load/or/and/store sequence into a narrower store when it is
safe.  Daniel tells me that clang will start producing this sort
of thing with bitfields, and this does  trigger a few dozen times
on 176.gcc produced by llvm-gcc even now.

This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll 
into:

        movl    %eax, 36(%rdi)

instead of:

        movl    $4294967295, %eax       ## imm = 0xFFFFFFFF
        andq    32(%rdi), %rax
        shlq    $32, %rcx
        addq    %rax, %rcx
        movq    %rcx, 32(%rdi)

and each of the testcases into a single store.  Each of them used
to compile into craziness like this:

_test4:
	movl	$65535, %eax            ## imm = 0xFFFF
	andl	(%rdi), %eax
	shll	$16, %esi
	addl	%eax, %esi
	movl	%esi, (%rdi)
	ret




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101343 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 04:48:01 +00:00
Dan Gohman
ae541aad5c Add more const qualifiers for LLVM IR pointers in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 04:33:49 +00:00
Anders Carlsson
0dbdca5a85 Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 03:11:28 +00:00
Dan Gohman
46510a73e9 Add const qualifiers to CodeGen's use of LLVM IR constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:51:59 +00:00
Eric Christopher
cff6f85454 Allow lowering for palignr instructions for mmx sized vectors. Add
patterns to handle the lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:40:20 +00:00
Evan Cheng
adf979900c More 80 violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:25:27 +00:00
Johnny Chen
44398693e7 Wrap the error msgs in DEBUG() macro so that they won't appear in NDEBUG build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101329 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:20:56 +00:00
Evan Cheng
22d286b218 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 01:01:55 +00:00
Devang Patel
f8a2e01fc7 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 00:02:49 +00:00
Devang Patel
d33402629e There is no need to track compile unit offsets if there is only one compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101315 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 23:56:24 +00:00
Devang Patel
7a996b2b05 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 23:54:13 +00:00
Tobias Grosser
a76b334d44 IPO needs ScalarOpts and InstCombine in its libs
The commit "Adding IPSCCP and Internalize passes to the C-bindings" introduced
new dependencies for IPO. Add these to the CMAKE build as otherwise the
BUILD_SHARED_LIBS=1 build fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 23:42:23 +00:00
Johnny Chen
d1ec11a850 Fixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()
function checks whether we have a valid submode for VLDM/VSTM (must be either
"ia" or "db") before calling ARM_AM::getAM5Opc(AMSubMode, unsigned char).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:37:17 +00:00
Jim Grosbach
e7b52526d3 Add -arm-long-calls option to force calls to be indirect. This makes the
kernel linker happier when dealing with kexts.

Radar 7805069



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:28:31 +00:00
Dan Gohman
0a60fa3321 Constify GetConstantStringInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:20:45 +00:00
Nicolas Geoffray
4eb373988e Don't use DILocation when processing a DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:06:37 +00:00
Johnny Chen
2fd100a4cb For t2BFI disassembly, apply the same error checking as in r101205.
Change the error msg to read "Encoding error: msb < lsb".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 22:04:45 +00:00
Dan Gohman
7ad3b2a3f0 Move a bunch of methods from CallSite to CallSiteBase, so that they can
be used in ImmutableCallSite too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 21:47:32 +00:00
Johnny Chen
d907d2566a Fixed another assert exposed by fuzzing. The utility function getRegisterEnum()
was asserting because the (RegClass, RegNum) combination doesn't make sense from
an encoding point of view.

Since getRegisterEnum() is used all over the place, to change the code to check
for encoding error after each call would not only bloat the code, but also make
it less readable.  An Err flag is added to the ARMBasicMCBuilder where a client
can set a non-zero value to indicate some kind of error condition while building
up the MCInst.  ARMBasicMCBuilder::BuildIt() checks this flag and returns false
if a non-zero value is detected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 21:03:13 +00:00
Evan Cheng
86cd445645 - Code clean up to reduce indentation.
- TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:52:55 +00:00
Bob Wilson
164cd8b8d3 Don't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
does not have a legal type.  The legalizer does not know how to handle those
nodes.  Radar 7854640.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:45:23 +00:00
Dan Gohman
6465265ae1 Delete unneeeded arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:17:22 +00:00
Dan Gohman
6a732b5a66 Delete unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 20:05:00 +00:00
Dan Gohman
2520864773 Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 19:53:31 +00:00
Dan Gohman
7f6b8b8891 Reset the debug location even if the instruction was a terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 19:30:02 +00:00
Dan Gohman
11609451a5 Refine #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:49:17 +00:00
Dan Gohman
fe85e76473 Pull utility routines with no SelectionDAG dependence out of
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:31:02 +00:00
Dan Gohman
b02b62a271 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:24:06 +00:00
Gabor Greif
6ed58e0d16 performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 18:13:29 +00:00
Dan Gohman
988099700a Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:40:25 +00:00
Dan Gohman
c21a2dc8df Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:22:02 +00:00
Dan Gohman
5dc44335b1 Clear the FunctionLoweringInfo object before doing other things that
don't need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:13:16 +00:00
Dan Gohman
0e026729ae Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
drop the redundant #ifndef NDEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:11:23 +00:00
Dan Gohman
046fe6b6ba Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:09:37 +00:00
Dan Gohman
b13033f61c Move the code for initialing the entry block livein set out of
SelectionDAGISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:05:00 +00:00
Dan Gohman
c0fb65da04 Reorgnaize this code to be more tidy and readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 17:02:07 +00:00
Dan Gohman
441516fb3d Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:54:39 +00:00
Dan Gohman
98708260f5 Move the code for emitting livein copies out of SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:51:49 +00:00
Gabor Greif
67894a3d02 performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:48:56 +00:00
Dan Gohman
de4c0a7da7 Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:32:56 +00:00
Dan Gohman
d0d8275cb2 It's not necessary to recompute EB here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:30:40 +00:00
Gabor Greif
488d4421c6 performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:13:56 +00:00
Dan Gohman
2c93e39072 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 16:08:56 +00:00
Nick Lewycky
29efad1d26 Enable RTTI again. While this works fine for LLVM, it creates an ABI
incompatibility with some clients covered by the buildbots, such as llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:51:59 +00:00
Nick Lewycky
0a850d6af4 Turn off RTTI for VMCore. Yay!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:30:13 +00:00
Nick Lewycky
3c594ff290 I don't know how, but I managed to goof the revert. Remove function that should
have been removed in r101231.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:03:50 +00:00
Nick Lewycky
3715e45da5 Revert r101213.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:51:58 +00:00
Nick Lewycky
beba1a31a4 Fix 80 column ruler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101229 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:35 +00:00
Chris Lattner
d305035155 implement mc asmparser support for '.', which gets the
current PC.  rdar://7834775

We now produce an identical .o file compared to the cctools
assembler for something like this:

_f0:
L0:
        jmp L1
        .long . - L0
L1:
        jmp A
        .long . - L1

        .zerofill __DATA,_bss,A,0



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:28 +00:00
Nick Lewycky
ff1ef6bdf1 Remove tab.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:19:05 +00:00
Nick Lewycky
5894c0b60e While DAE can't modify the function signature of an externally visible function,
it can check whether the visible direct callers are passing in parameters to
dead arguments and replace those with undef.

This reinstates r94322 with bugs fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 03:38:11 +00:00
Dan Gohman
32acbc1e50 Generalize this code to handle Instructions in addition to ConstantExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101210 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 02:33:23 +00:00
Dan Gohman
b4be71e112 Reorder the methods of this class to be a little more organized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101206 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 02:09:45 +00:00
Johnny Chen
6f72ab345d Fixed another assert exposed by fuzzing. Now, when an encoding error occurs
involing getBFCInvMask() where lsb <= msb does not hold true, the disassembler
just returns false, instead of assert, to indicate disassembly error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 02:05:29 +00:00
Devang Patel
1d526c38e2 Clear MachineInstr->MCSymbol maps at the end of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 01:18:28 +00:00
Johnny Chen
efcdac0c41 Fixed an assert() exposed by fuzzing. Now, instead of assert when an invalid
instruction encoding is encountered, we just return a NULL ARMBasicMCBuilder
instance and the client just returns false to indicate disassembly error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 01:17:37 +00:00
Douglas Gregor
533ae9b71d Unbreak CMake build by improving the EnhancedDisassembly makefile a
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:47:43 +00:00
Evan Cheng
6327537a37 Fast path implicit_def check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:13:34 +00:00
Bob Wilson
6a234f07fa Handle a v2f64 formal parameter that is split between registers and memory
such that the entire second half is in memory.  Radar 7855014.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:03:22 +00:00
Sean Callanan
9899f70a74 Fixed a nasty layering violation in the edis source
code.  It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis.  If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 21:21:57 +00:00
Johnny Chen
8a87ffb925 Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
instead of 7, because we are only looking for even rotate amount.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:35:16 +00:00
Devang Patel
50d80e394d Do not include types without any definition in pubtypes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:35:04 +00:00
Evan Cheng
c15d9135a8 Avoid variable shadowing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:25:29 +00:00
Evan Cheng
aeb2f4aa46 Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:21:05 +00:00
Jakob Stoklund Olesen
8d17160e2c Teach MachineSinking to handle easy critical edges.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 19:06:14 +00:00
Evan Cheng
fc5a03e469 Re-apply 101075 and fix it properly. Just reuse the debug info of the branch instruction being optimized. There is no need to --I which can deref off start of the BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101162 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 18:50:27 +00:00
Eric Christopher
97e6992e3e Temporarily revert r101075, it's causing invalid iterator assertions
in a nightly tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 18:37:58 +00:00
Evan Cheng
5dc57ce533 Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 18:16:00 +00:00
Dan Gohman
4183e31978 Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 17:07:06 +00:00
Dan Gohman
81bf03eb5c Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:57:55 +00:00
Dan Gohman
9e9aa44d1a Rename MachineFrameInfo variables to MFI, for consistency with
the rest of CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:56:45 +00:00
Dan Gohman
13e73f483e Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:55:37 +00:00
Dan Gohman
c5e43c958e Use MachineBasicBlock::isLiveIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:53:51 +00:00
Dan Gohman
5c982949bf Delete an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:51:39 +00:00
Dan Gohman
28287794d4 Teach ScalarEvolution to simplify smax and umax when it can prove
that one operand is always greater than another.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101142 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:51:03 +00:00
Dan Gohman
3ab131243e Minor code micro-optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101141 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:49:23 +00:00
Eric Christopher
2a7cb9d9ce Actually... return after the check for invalid input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:41:29 +00:00
Benjamin Kramer
b0322e6ddf BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 16:38:06 +00:00
Benjamin Kramer
5e6a705985 Let BumpPtrAllocator lazily allocate the first slab.
We have some code in llvm and clang where a BumpPtrAllocator is declared in a
class but never used in the common case. Stop wasting memory there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 14:41:51 +00:00
Owen Anderson
d5e624027a Remove SCCVN from the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 08:33:09 +00:00
Owen Anderson
fd64901579 SCCVN, we hardly knew ye!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 05:24:08 +00:00
Chris Lattner
7c57b7b808 Fix PR6826: GraphWriter delete the generated file before "dotty" load it,
patch by 'ether'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101116 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 04:35:39 +00:00
Bob Wilson
b123b8bee0 Replace r101053 with a fix for getSOImmValRotate() so that it will correctly
recognize all the valid rotated immediates.  This fixes the disassembler
issue and will also help codegen for some unusual constant values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101114 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 02:11:48 +00:00
Dan Gohman
a590b79ee2 Teach IndVarSimplify how to eliminate remainder operators where the
numerator is an induction variable. For example, with code like this:

  for (i=0;i<n;++i)
    x[i%n] = 0;

IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the remainder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 01:46:36 +00:00
Daniel Dunbar
afc9a0c6b0 VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type
without occasionally needed to call IntegerType::get.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 01:39:07 +00:00
Chris Lattner
43ac721e3b add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 00:36:43 +00:00
Dan Gohman
bca091d561 Micro-optimize a few hot spots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 23:08:18 +00:00
Evan Cheng
82865a10f8 Use .set expression for x86 pic jump table reference to reduce assembly relocation. rdar://7738756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101085 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 23:07:17 +00:00
Dan Gohman
6ab10f69a9 Add fast paths to ScalarEvolution::getSizeOf and getOffsetOf, as
they're used a lot by getNodeForGEP, which can be called a lot.
This speeds up -iv-users by around 15% on several testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 23:03:26 +00:00
Bill Wendling
2aae6ae572 Micro-optimization:
If we have this situation:

    jCC  L1
    jmp  L2
L1:
  ...
L2:
  ...

We can get a small performance boost by emitting this instead:

    jnCC L2
L1:
  ...
L2:
  ...

This testcase shows an example of this:

float func(float x, float y) {
    double product = (double)x * y;
    if (product == 0.0)
        return product;
    return product - 1.0;
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101075 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 22:19:57 +00:00
Dan Gohman
3b49063a83 Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101074 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 22:12:29 +00:00
Dan Gohman
ca9b7037e2 Suppress LinearFunctionTestReplace when the computed backedge-taken
expression is a UDiv and it doesn't appear that the UDiv came from
the user's source.

ScalarEvolution has recently figured out how to compute a tripcount
expression for the inner loop in
SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a
udiv instruction dramatically slows down the enclosing loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 21:13:43 +00:00
Johnny Chen
bb6e9d8cf7 Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after calling
ARM_AM::getSoImmVal(V) with a legitimate so_imm value: #245 rotate right by 2.
Introduce ARM_AM::getSOImmValOneOrNoRotate(unsigned Arg) which is called from
ARMInstPrinter.cpp's printSOImm() function, replacing ARM_AM::getSOImmVal(V).

[12:44:43] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ gdb Debug/bin/llvm-mc
GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) set args  -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
(gdb) r
Starting program: /Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble
Reading symbols for shared libraries ++. done
0xf5 0x71 0xf0 0x53
Opcode=201 Name=MVNi Format=ARM_FORMAT_DPFRM(4)
 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
-------------------------------------------------------------------------------------------------
| 0: 1: 0: 1| 0: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 1: 1| 0: 0: 0: 1| 1: 1: 1: 1| 0: 1: 0: 1|
-------------------------------------------------------------------------------------------------

	mvnpls	r7, Assertion failed: (V != -1 && "Not a valid so_imm value!"), function printSOImm, file ARMInstPrinter.cpp, line 229.

Program received signal SIGABRT, Aborted.
0x00007fff88c65886 in __kill ()
(gdb) bt
#0  0x00007fff88c65886 in __kill ()
#1  0x00007fff88d05eae in abort ()
#2  0x00007fff88cf2ef0 in __assert_rtn ()
#3  0x000000010020e422 in printSOImm (O=@0x1010bdf80, V=-1, VerboseAsm=false, MAI=0x1020106d0) at ARMInstPrinter.cpp:229
#4  0x000000010020e5fe in llvm::ARMInstPrinter::printSOImmOperand (this=0x1020107e0, MI=0x7fff5fbfee70, OpNum=1, O=@0x1010bdf80) at ARMInstPrinter.cpp:254
#5  0x00000001001ffbc0 in llvm::ARMInstPrinter::printInstruction (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMGenAsmWriter.inc:3236
#6  0x000000010020c27c in llvm::ARMInstPrinter::printInst (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMInstPrinter.cpp:182
#7  0x000000010003cbff in PrintInsts (DisAsm=@0x10200f4e0, Printer=@0x1020107e0, Bytes=@0x7fff5fbff060, SM=@0x7fff5fbff078) at Disassembler.cpp:65
#8  0x000000010003c8b4 in llvm::Disassembler::disassemble (T=@0x1010c13c0, Triple=@0x1010b6798, Buffer=@0x102010690) at Disassembler.cpp:153
#9  0x000000010004095c in DisassembleInput (ProgName=0x7fff5fbff3f0 "/Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc") at llvm-mc.cpp:347
#10 0x000000010003eefb in main (argc=4, argv=0x7fff5fbff298) at llvm-mc.cpp:374
(gdb) q
The program is running.  Exit anyway? (y or n) y
[13:36:26] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 18:46:53 +00:00
Dan Gohman
8b3d6682a4 Remove a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 16:26:03 +00:00
Tobias Grosser
63d3659a44 Remove unneeded debug in PostDominator runOnFunction()
The information is already available with "opt -analyze". The DominatorTree
does also not have this in its runOnFunction. So they behave now
more consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 15:32:55 +00:00
Tobias Grosser
e7e08c39de Remove dead code in the dotty dominance tree printer.
This template is not needed anymore as it was replaced by the
DOTGraphTraitsViewer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 15:02:19 +00:00
Benjamin Kramer
678d9b7ed0 Plug trivial leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 11:38:35 +00:00
Dan Gohman
ef817ccec4 Delete this code, which is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 08:00:22 +00:00
Dan Gohman
d890f29ca6 Move the EliminateIVUsers call back out to its original location. Now that
a ScalarEvolution bug with overflow handling is fixed, the normal analysis
code will automatically decline to operate on the icmp instructions which
are responsible for the loop exit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 07:56:56 +00:00
Dan Gohman
27dead44e0 Generalize ScalarEvolution's PHI analysis to handle loops that don't
have preheaders or dedicated exit blocks, as clients may not otherwise
need to run LoopSimplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 07:49:36 +00:00
Dan Gohman
646e047765 Rewrite the overflow checking in the get{Signed,Unsigned}Range code for
AddRecs so that it checks for overflow in the computation that it is
performing, rather than just checking hasNo{Signed,Unsigned}Wrap, since
those flags are for a different computation. This fixes a bug that
impacts an upcoming change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 07:39:33 +00:00
Dan Gohman
dd842e34c8 Use RecursivelyDeleteTriviallyDeadInstructions in EliminateIVComparisons,
instead of deleting just the user. This makes it more consistent with
other code in IndVarSimplify, and theoretically can eliminate more users
earlier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 07:29:15 +00:00
Evan Cheng
09010a30fd Enable post regalloc machine licm by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101023 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 06:25:28 +00:00
Eric Christopher
67a71b5306 Verify function prototypes before trying to optimize functions. We also
need TargetData, just return false if we don't have it.

Update testcases accordingly.

Fixes PR6807.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 04:48:00 +00:00
Dan Gohman
58c2587ed8 Remove unnecessary parens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101010 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 02:24:01 +00:00
Dan Gohman
ce80051170 Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101009 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 02:22:30 +00:00
Dan Gohman
931e345e76 Re-apply r101000, with a fix: Don't eliminate an icmp which is part of
the loop exit test. This usually doesn't come up for a variety of
reasons, but it isn't impossible, so make IndVarSimplify handle it
conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 02:21:50 +00:00
Dan Gohman
ac3b9cdf15 Revert 101000, which is breaking self-host builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 00:17:10 +00:00
Dan Gohman
5ee60f7508 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 23:44:58 +00:00
Dan Gohman
3fddbb337d Teach IndVarSimplify how to eliminate comparisons involving induction
variables. For example, with code like this:

  for (i=0;i<n;++i)
    if (i<n)
      x[i] = 0;

IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the if.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101000 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 23:10:12 +00:00
Dan Gohman
53c66eacc4 Enhance ScalarEvolution::isKnownPredicate with support for
loop conditions which are invariants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 22:16:48 +00:00
Dan Gohman
b64cf896f8 Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 22:13:11 +00:00
Dan Gohman
bc7129f9db When creating a ConstantRange for [n,UINT_MAX], special case n == 0, because
ConstantRange(0, 0) creates an empty range rather than a full one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 22:12:18 +00:00
Dan Gohman
e521ccb5bd Add a cast to void to show that the return value is being
intentionally ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:30:19 +00:00
Dan Gohman
87527c594f Delete a dead check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100983 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:29:41 +00:00
Dan Gohman
86eeeaf877 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:28:47 +00:00
Dan Gohman
3948d0b8b0 Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
that it's only testing for the entry condition, not full loop-invariant
conditions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-11 19:27:13 +00:00
Chris Lattner
5106dcd078 Implement support for varargs functions without any fixed
parameters in the CBE by implicitly adding a fixed argument.
This allows eliminating a work-around from DAE.  Patch by
Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100944 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 19:12:44 +00:00
Chris Lattner
6f285d2105 fix PR6743, a case where we'd delete an instruction before using it
in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 18:26:57 +00:00
Chris Lattner
a2fb234b04 fix PR6760, a missing check in heap SRoA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 18:19:22 +00:00
Chris Lattner
f7240de877 turn an assert into a proper check, fixing crash on invalid here:
$ llvm-as t.ll
llvm-as: t.ll:1:6: error: expected 'type' after '='
%0 = = type { i32, float, float, double }
     ^

PR6810.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 18:01:25 +00:00
Chris Lattner
47e476609b improve haiku portability, patch by Paul Davey.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 17:54:51 +00:00
Chris Lattner
0941534c71 add attributes and module level asm to the ocaml bindings,
patch by Patrick Walton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 17:52:58 +00:00
Dan Gohman
2c8a9f8ad9 Fix a typo and some indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 22:47:25 +00:00
Dan Gohman
e5f76877ae When determining a canonical insert position, don't climb deeper
into adjacent loops. Also, ensure that the insert position is
dominated by the loop latch of any loop in the post-inc set which
has a latch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 22:07:05 +00:00
Bob Wilson
347fa3fa26 Tidy whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 21:38:26 +00:00
Chris Lattner
e3a39d40db suck the propagating "has dynamic libs" check into a single makefile
variable TARGET_HAS_DYNAMIC_LIBS


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:51:47 +00:00
Chris Lattner
21aa347c28 add minix support, patch by Kees van Reeuwijk! PR6797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:45:04 +00:00
Chris Lattner
2ebad5ad41 clean this up, fix std::min ambiguity on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100894 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:43:54 +00:00
Wesley Peck
16ddd885d8 Adding IPSCCP and Internalize passes to the C-bindings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100893 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:43:20 +00:00
Bob Wilson
ec80e2693a Provide versions of the ARM eh_sjlj_setjmp instructions for non-VFP subtargets
such that the non-VFP versions have no implicit defs of VFP registers.
If any callee-saved VFP registers are marked as having been defined, the
prologue/epilogue code will try to save and restore them.
Radar 7770432.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:41:18 +00:00
Dan Gohman
f8d0578e4c When emitting code for an add, don't force a SCEVUnknown wrapper around
a hoisted intermediate result if the intermediate result isn't an
Instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 19:14:31 +00:00
Dan Gohman
4a2a683366 When looking for loop-invariant users, look through no-op instructions,
so that an unfortunately placed bitcast doesn't pin a value in a
register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100883 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 19:12:34 +00:00
Chris Lattner
dc8446330f "On SPU, variables in the .bss section that are allocated with the .lcomm directive are not aligned on 16 byte boundaries. This causes misaligned loads, as the generated assembly assumes this "default" alignment.
this patch disables .lcomm in favour of '.local .comm'

Patch by Kalle Raisklia!




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 18:27:03 +00:00
Dan Gohman
53b73a283e Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 18:20:03 +00:00
Devang Patel
5142471fcd Clear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100867 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 16:04:20 +00:00
Gabor Greif
c092362300 performance: cache result of looking up user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 15:18:34 +00:00
Dan Gohman
6c3ae655b8 Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 14:53:59 +00:00
Dan Gohman
7d597b4428 Delete this obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 14:12:01 +00:00