oota-llvm.git
14 years agofix PR6832: we were using the alignment of a pointer when we
Chris Lattner [Fri, 16 Apr 2010 01:05:38 +0000 (01:05 +0000)]
fix PR6832: we were using the alignment of a pointer when we
wanted the alignment of the pointee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101432 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCreate an exports file, so that the plugin only exports the onload symbol.
Dan Gohman [Fri, 16 Apr 2010 00:43:25 +0000 (00:43 +0000)]
Create an exports file, so that the plugin only exports the onload symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101431 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake things static that don't need to be referenced from outside the file.
Dan Gohman [Fri, 16 Apr 2010 00:42:57 +0000 (00:42 +0000)]
Make things static that don't need to be referenced from outside the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101430 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove comments.
Chris Lattner [Fri, 16 Apr 2010 00:38:19 +0000 (00:38 +0000)]
improve comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101429 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an svn:ignore.
Dan Gohman [Fri, 16 Apr 2010 00:26:43 +0000 (00:26 +0000)]
Add an svn:ignore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101428 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopull all the ConvertToScalarInfo code together into one
Chris Lattner [Fri, 16 Apr 2010 00:24:57 +0000 (00:24 +0000)]
pull all the ConvertToScalarInfo code together into one
place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101427 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomore refactoring: suck some stuff out of SRoA into
Chris Lattner [Fri, 16 Apr 2010 00:20:00 +0000 (00:20 +0000)]
more refactoring: suck some stuff out of SRoA into
ConvertToScalarInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101425 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoshift intrinsic operand
Gabor Greif [Fri, 16 Apr 2010 00:06:45 +0000 (00:06 +0000)]
shift intrinsic operand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101423 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agointroduce a new ConvertToScalarInfo struct to simplify
Chris Lattner [Thu, 15 Apr 2010 23:50:26 +0000 (23:50 +0000)]
introduce a new ConvertToScalarInfo struct to simplify
CanConvertToScalar/MergeInType.  Eliminate a pointless
LLVMContext argument to MergeInType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101422 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid sinking machine instructions into a loop.
Jakob Stoklund Olesen [Thu, 15 Apr 2010 23:41:02 +0000 (23:41 +0000)]
Avoid sinking machine instructions into a loop.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101420 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded another test case for am3offset operand, testing Rn, #+/-imm8.
Johnny Chen [Thu, 15 Apr 2010 23:23:40 +0000 (23:23 +0000)]
Added another test case for am3offset operand, testing Rn, #+/-imm8.
Previous checkin tested Rn, #+/-Rm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101418 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd test case for machine-sink on critical edges
Jakob Stoklund Olesen [Thu, 15 Apr 2010 23:19:16 +0000 (23:19 +0000)]
Add test case for machine-sink on critical edges

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101416 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed a bug in ARM disassembly where LDRSBT should have am3offset operand, not
Johnny Chen [Thu, 15 Apr 2010 23:12:47 +0000 (23:12 +0000)]
Fixed a bug in ARM disassembly where LDRSBT should have am3offset operand, not
am2offset.  Modified the instruction table entry and added a new test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101415 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the export files absolute paths, and change Makefile.rules
Dan Gohman [Thu, 15 Apr 2010 23:08:00 +0000 (23:08 +0000)]
Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a dependency on the .dir file to make sure that the directory
Dan Gohman [Thu, 15 Apr 2010 22:46:27 +0000 (22:46 +0000)]
Add a dependency on the .dir file to make sure that the directory
is created before the native exports file is built in a parallel build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101413 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse default lowering of DYNAMIC_STACKALLOC. As far as I can tell, ARM isle is doing...
Evan Cheng [Thu, 15 Apr 2010 22:20:34 +0000 (22:20 +0000)]
Use default lowering of DYNAMIC_STACKALLOC. As far as I can tell, ARM isle is doing the right thing and codegen looks correct for both Thumb and Thumb2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101410 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy interface to isOnlyCopiedFromConstantGlobal
Chris Lattner [Thu, 15 Apr 2010 21:59:20 +0000 (21:59 +0000)]
tidy interface to isOnlyCopiedFromConstantGlobal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101405 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the new
Daniel Dunbar [Thu, 15 Apr 2010 21:57:43 +0000 (21:57 +0000)]
Don't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the new
system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101404 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
Dan Gohman [Thu, 15 Apr 2010 20:54:25 +0000 (20:54 +0000)]
Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101399 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agozap mergeinfo
Gabor Greif [Thu, 15 Apr 2010 20:52:17 +0000 (20:52 +0000)]
zap mergeinfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101398 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreapply r101364, which has been backed out in r101368
Gabor Greif [Thu, 15 Apr 2010 20:51:13 +0000 (20:51 +0000)]
reapply r101364, which has been backed out in r101368
with a fix

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@101397 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPointed out by housel on #llvm.
Duncan Sands [Thu, 15 Apr 2010 20:35:54 +0000 (20:35 +0000)]
Pointed out by housel on #llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101395 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6847. RegScavenger should ignore DebugValues.
Jakob Stoklund Olesen [Thu, 15 Apr 2010 20:28:39 +0000 (20:28 +0000)]
Fix PR6847. RegScavenger should ignore DebugValues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101392 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake sure the initialization of a GC root is after its definition.
Nicolas Geoffray [Thu, 15 Apr 2010 19:53:35 +0000 (19:53 +0000)]
Make sure the initialization of a GC root is after its definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101388 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r100896 and around - this breaks the only mingw32 buildbot we have.
Anton Korobeynikov [Thu, 15 Apr 2010 19:51:42 +0000 (19:51 +0000)]
Revert r100896 and around - this breaks the only mingw32 buildbot we have.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101387 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoprune includes
Gabor Greif [Thu, 15 Apr 2010 19:44:21 +0000 (19:44 +0000)]
prune includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101385 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoARM SelectDYN_ALLOC should emit a copy from SP rather than referencing SP directly...
Evan Cheng [Thu, 15 Apr 2010 18:42:28 +0000 (18:42 +0000)]
ARM SelectDYN_ALLOC should emit a copy from SP rather than referencing SP directly. In cases where there are two dyn_alloc in the same BB it would have caused the old SP value to be reused and badness ensues. rdar://7493908

llvm is generating poor code for dynamic alloca, I'll fix that later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101383 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDEBUG() print out "Unknown format" msg.
Johnny Chen [Thu, 15 Apr 2010 18:13:51 +0000 (18:13 +0000)]
DEBUG() print out "Unknown format" msg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101382 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReuseFrameIndexVals is used in multiple files, so it can't be static.
Dan Gohman [Thu, 15 Apr 2010 17:34:58 +0000 (17:34 +0000)]
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

14 years agoEnablePPC64RS and EnablePPC32RS are used in multiple files, so they
Dan Gohman [Thu, 15 Apr 2010 17:20:57 +0000 (17:20 +0000)]
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

14 years agoFix a bunch of namespace polution.
Dan Gohman [Thu, 15 Apr 2010 17:08:50 +0000 (17:08 +0000)]
Fix a bunch of namespace polution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix namespace polution.
Dan Gohman [Thu, 15 Apr 2010 16:23:27 +0000 (16:23 +0000)]
Fix namespace polution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101375 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake getPredecessorWithUniqueSuccessorForBB return the unique successor
Dan Gohman [Thu, 15 Apr 2010 16:19:08 +0000 (16:19 +0000)]
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

14 years agotypos
Gabor Greif [Thu, 15 Apr 2010 15:14:46 +0000 (15:14 +0000)]
typos

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101371 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoback out r101364, as it trips the linux nightlybot on some clang C++ tests
Gabor Greif [Thu, 15 Apr 2010 12:46:56 +0000 (12:46 +0000)]
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

14 years agozap mergeinfo
Gabor Greif [Thu, 15 Apr 2010 11:36:12 +0000 (11:36 +0000)]
zap mergeinfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101366 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify ".bc" detection.
Benjamin Kramer [Thu, 15 Apr 2010 11:33:14 +0000 (11:33 +0000)]
Simplify ".bc" detection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorotate CallInst operands, i.e. move callee to the back
Gabor Greif [Thu, 15 Apr 2010 10:49:53 +0000 (10:49 +0000)]
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

14 years agoenhance the load/store narrowing optimization to handle a
Chris Lattner [Thu, 15 Apr 2010 06:10:49 +0000 (06:10 +0000)]
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

14 years agoteach codegen to turn trunc(zextload) into load when possible.
Chris Lattner [Thu, 15 Apr 2010 05:40:59 +0000 (05:40 +0000)]
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

14 years agoadd a simple dag combine to replace trivial shl+lshr with
Chris Lattner [Thu, 15 Apr 2010 05:28:43 +0000 (05:28 +0000)]
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

14 years agoImplement rdar://7860110 (also in target/readme.txt) narrowing
Chris Lattner [Thu, 15 Apr 2010 04:48:01 +0000 (04:48 +0000)]
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

14 years agoAdd more const qualifiers for LLVM IR pointers in CodeGen.
Dan Gohman [Thu, 15 Apr 2010 04:33:49 +0000 (04:33 +0000)]
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

14 years agofurther tweak this to do something useful.
Chris Lattner [Thu, 15 Apr 2010 04:31:42 +0000 (04:31 +0000)]
further tweak this to do something useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101341 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove undef control flow.
Chris Lattner [Thu, 15 Apr 2010 04:30:19 +0000 (04:30 +0000)]
remove undef control flow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101340 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unnecessary uses of <iostream>.
Daniel Dunbar [Thu, 15 Apr 2010 03:47:24 +0000 (03:47 +0000)]
Remove unnecessary uses of <iostream>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotests: MC/Disassembler tests depend on ARM support being compiler in.
Daniel Dunbar [Thu, 15 Apr 2010 03:47:20 +0000 (03:47 +0000)]
tests: MC/Disassembler tests depend on ARM support being compiler in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101337 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a crash on "lli ex" or any other file whose name is exactly two
Chris Lattner [Thu, 15 Apr 2010 03:32:19 +0000 (03:32 +0000)]
fix a crash on "lli ex" or any other file whose name is exactly two
characters long.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101336 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix build.
Anders Carlsson [Thu, 15 Apr 2010 03:11:28 +0000 (03:11 +0000)]
Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101335 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd const qualifiers to CodeGen's use of LLVM IR constructs.
Dan Gohman [Thu, 15 Apr 2010 01:51:59 +0000 (01:51 +0000)]
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

14 years agoAllow lowering for palignr instructions for mmx sized vectors. Add
Eric Christopher [Thu, 15 Apr 2010 01:40:20 +0000 (01:40 +0000)]
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

14 years agoMore 80 violations.
Evan Cheng [Thu, 15 Apr 2010 01:25:27 +0000 (01:25 +0000)]
More 80 violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWrap the error msgs in DEBUG() macro so that they won't appear in NDEBUG build.
Johnny Chen [Thu, 15 Apr 2010 01:20:56 +0000 (01:20 +0000)]
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

14 years ago80 col violations.
Evan Cheng [Thu, 15 Apr 2010 01:01:55 +0000 (01:01 +0000)]
80 col violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101325 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment.
Devang Patel [Thu, 15 Apr 2010 00:02:49 +0000 (00:02 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101317 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThere is no need to track compile unit offsets if there is only one compile unit.
Devang Patel [Wed, 14 Apr 2010 23:56:24 +0000 (23:56 +0000)]
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

14 years agoRemove dead code.
Devang Patel [Wed, 14 Apr 2010 23:54:13 +0000 (23:54 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101314 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIPO needs ScalarOpts and InstCombine in its libs
Tobias Grosser [Wed, 14 Apr 2010 23:42:23 +0000 (23:42 +0000)]
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

14 years agoFixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()
Johnny Chen [Wed, 14 Apr 2010 22:37:17 +0000 (22:37 +0000)]
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

14 years agoAdd -arm-long-calls option to force calls to be indirect. This makes the
Jim Grosbach [Wed, 14 Apr 2010 22:28:31 +0000 (22:28 +0000)]
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

14 years agoFix TrackingVH to handle const Value subclasses.
Dan Gohman [Wed, 14 Apr 2010 22:24:25 +0000 (22:24 +0000)]
Fix TrackingVH to handle const Value subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101300 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a const here. This makes this function consistent with all the
Dan Gohman [Wed, 14 Apr 2010 22:23:05 +0000 (22:23 +0000)]
Remove a const here. This makes this function consistent with all the
other getOperand wrappers, and it makes it easier to use with DebugInfo
code, which isn't currently prepared to see const MDNode *.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101299 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConstify GetConstantStringInfo.
Dan Gohman [Wed, 14 Apr 2010 22:20:45 +0000 (22:20 +0000)]
Constify GetConstantStringInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101298 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't use DILocation when processing a DebugLoc.
Nicolas Geoffray [Wed, 14 Apr 2010 22:06:37 +0000 (22:06 +0000)]
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

14 years agoFor t2BFI disassembly, apply the same error checking as in r101205.
Johnny Chen [Wed, 14 Apr 2010 22:04:45 +0000 (22:04 +0000)]
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

14 years agoMove a bunch of methods from CallSite to CallSiteBase, so that they can
Dan Gohman [Wed, 14 Apr 2010 21:47:32 +0000 (21:47 +0000)]
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

14 years agoFixed another assert exposed by fuzzing. The utility function getRegisterEnum()
Johnny Chen [Wed, 14 Apr 2010 21:03:13 +0000 (21:03 +0000)]
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

14 years agoRemove unneeded types from test.
Jakob Stoklund Olesen [Wed, 14 Apr 2010 20:56:09 +0000 (20:56 +0000)]
Remove unneeded types from test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101286 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Code clean up to reduce indentation.
Evan Cheng [Wed, 14 Apr 2010 20:52:55 +0000 (20:52 +0000)]
- 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

14 years agoUse FunTy instead of hard-coding Function.
Dan Gohman [Wed, 14 Apr 2010 20:49:44 +0000 (20:49 +0000)]
Use FunTy instead of hard-coding Function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101283 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
Bob Wilson [Wed, 14 Apr 2010 20:45:23 +0000 (20:45 +0000)]
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

14 years agoOops, make these public.
Dan Gohman [Wed, 14 Apr 2010 20:31:28 +0000 (20:31 +0000)]
Oops, make these public.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101280 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove getType() and getCaller() into CallSiteBase so that
Dan Gohman [Wed, 14 Apr 2010 20:28:44 +0000 (20:28 +0000)]
Move getType() and getCaller() into CallSiteBase so that
ImmutableCallSite can use them too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrim tests and convert to FileCheck.
Evan Cheng [Wed, 14 Apr 2010 20:22:17 +0000 (20:22 +0000)]
Trim tests and convert to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101277 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete unneeeded arguments.
Dan Gohman [Wed, 14 Apr 2010 20:17:22 +0000 (20:17 +0000)]
Delete unneeeded arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete unused arguments.
Dan Gohman [Wed, 14 Apr 2010 20:05:00 +0000 (20:05 +0000)]
Delete unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFactor out EH landing pad code into a separate function, and constify
Dan Gohman [Wed, 14 Apr 2010 19:53:31 +0000 (19:53 +0000)]
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

14 years agoReset the debug location even if the instruction was a terminator.
Dan Gohman [Wed, 14 Apr 2010 19:30:02 +0000 (19:30 +0000)]
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

14 years agoFix a missing #include.
Dan Gohman [Wed, 14 Apr 2010 18:57:18 +0000 (18:57 +0000)]
Fix a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101270 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefine #includes.
Dan Gohman [Wed, 14 Apr 2010 18:49:17 +0000 (18:49 +0000)]
Refine #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSplit ISD::NodeType and a few related items out of SelectionDAGNodes.h
Dan Gohman [Wed, 14 Apr 2010 18:44:34 +0000 (18:44 +0000)]
Split ISD::NodeType and a few related items out of SelectionDAGNodes.h
into a separate header to allow clients to use them without pulling in
SelectionDAG-specific declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101268 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPull utility routines with no SelectionDAG dependence out of
Dan Gohman [Wed, 14 Apr 2010 18:31:02 +0000 (18:31 +0000)]
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

14 years agoFix typos in comments.
Dan Gohman [Wed, 14 Apr 2010 18:24:06 +0000 (18:24 +0000)]
Fix typos in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 18:13:29 +0000 (18:13 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101265 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an obsolete comment.
Dan Gohman [Wed, 14 Apr 2010 17:40:25 +0000 (17:40 +0000)]
Delete an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an unused function.
Dan Gohman [Wed, 14 Apr 2010 17:22:02 +0000 (17:22 +0000)]
Delete an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear the FunctionLoweringInfo object before doing other things that
Dan Gohman [Wed, 14 Apr 2010 17:13:16 +0000 (17:13 +0000)]
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

14 years agoMove this assert out of SelectionDAGISel into FunctionLoweringInfo, and
Dan Gohman [Wed, 14 Apr 2010 17:11:23 +0000 (17:11 +0000)]
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

14 years agoAdd a comment.
Dan Gohman [Wed, 14 Apr 2010 17:09:37 +0000 (17:09 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101260 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the code for initialing the entry block livein set out of
Dan Gohman [Wed, 14 Apr 2010 17:05:00 +0000 (17:05 +0000)]
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

14 years agoReorgnaize this code to be more tidy and readable.
Dan Gohman [Wed, 14 Apr 2010 17:02:07 +0000 (17:02 +0000)]
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

14 years agoTrim #includes.
Dan Gohman [Wed, 14 Apr 2010 16:54:39 +0000 (16:54 +0000)]
Trim #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the code for emitting livein copies out of SelectionDAGISel.
Dan Gohman [Wed, 14 Apr 2010 16:51:49 +0000 (16:51 +0000)]
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

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 16:48:56 +0000 (16:48 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101253 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSink landing-pad marking code out of
Dan Gohman [Wed, 14 Apr 2010 16:32:56 +0000 (16:32 +0000)]
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

14 years agoIt's not necessary to recompute EB here.
Dan Gohman [Wed, 14 Apr 2010 16:30:40 +0000 (16:30 +0000)]
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

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 16:13:56 +0000 (16:13 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment.
Dan Gohman [Wed, 14 Apr 2010 16:08:56 +0000 (16:08 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101248 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix whitespace, comments.
Dan Gohman [Wed, 14 Apr 2010 15:59:02 +0000 (15:59 +0000)]
Fix whitespace, comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd explicit keywords.
Dan Gohman [Wed, 14 Apr 2010 15:50:02 +0000 (15:50 +0000)]
Add explicit keywords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101246 91177308-0d34-0410-b5e6-96231b3b80d8