Sanjiv Gupta
1412c019ac
For extended loads of type i1 to i8, we will need to at least one byte from memory.
...
The change in the .td file is to mark the side effects of mov insn.
llvm-svn: 74768
2009-07-03 07:58:59 +00:00
Tilmann Scheller
f74cd942cc
Various small changes related to the Condition Register on PowerPC.
...
Don't spill to the CR save area when using the SVR4 ABI for now.
Don't rely on constants assigned for registers to be in order (they aren't assigned in order).
Make sure CR bits are mapped to the corresponding CR field.
llvm-svn: 74767
2009-07-03 06:47:55 +00:00
Tilmann Scheller
8166687389
Refactor ABI code in the PowerPC backend.
...
Make CalculateParameterAndLinkageAreaSize() Darwin-specific.
Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin().
Rename MachoABI to DarwinABI for consistency.
Rename ELF ABI to SVR4 ABI for consistency.
Factor out common call return lowering between the Darwin and SVR4 ABI.
Factor out common call lowering between the Darwin and SVR4 ABI.
llvm-svn: 74766
2009-07-03 06:47:08 +00:00
Tilmann Scheller
37389b484a
Implement the SVR4 ABI for PowerPC.
...
Implement LowerFORMAL_ARGUMENTS_SVR4().
Implement LowerCALL_SVR4().
Add support for split arguments.
Implement by value parameter passing for aggregates.
Add support for variable argument lists.
Create the spill area for argument registers of variable argument functions no longer at a fixed offset.
Make sure callee saved registers are spilled to the correct stack offsets.
Change allocation order of non-volatile floating-point registers.
Add VRSAVE to the list of callee-saved registers, add CallConvLowering for vararg calls.
Add support for variable argument calls with Vector arguments.
Add support for VR and VRSAVE save area, improve allocation order for non-volatile vector registers.
Stop creating illegal i8 values in LowerVASTART().
Add memory access width hints.
Make sure to reserve space on the stack for the frame pointer.
When using the SVR4 ABI, reserve r13 for the Small Data Area pointer.
Assure that the frame pointer is spilled to the correct location on the stack.
Some FP registers were not marked as volatile.
Make sure the i64 words from a long double are passed either both in registers or both on the stack.
Only put integer arguments in registers which are not marked with the inreg flag.
llvm-svn: 74765
2009-07-03 06:45:56 +00:00
Tilmann Scheller
cea3c16aa5
Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.
...
With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.
The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.
llvm-svn: 74764
2009-07-03 06:44:53 +00:00
Tilmann Scheller
5d12ad7f9c
Small cleanups in the PowerPC backend.
...
Small refactoring in LowerFORMAL_ARGUMENTS().
Correct minor formatting issues.
Remove size argument of CreateCopyOfByValArgument().
Remove dead argument from CalculateStackSlotSize().
Remove unused variable ReturnAddrIndex from various targets.
llvm-svn: 74763
2009-07-03 06:43:35 +00:00
Bruno Cardoso Lopes
0dc4fd3fcc
Factor some code out and support for Jump Table relocations
...
llvm-svn: 74760
2009-07-03 04:36:26 +00:00
Mikhail Glushenkov
46d25fa06e
Add --enable-llvmc-dynamic configure option.
...
Controls whether libCompilerDriver should be loaded dynamically. By default this
is needed only on Win32, to make dynamic plugins work.
llvm-svn: 74759
2009-07-03 03:52:47 +00:00
Evan Cheng
f20e4fba49
Add thumb2 sign / zero extend with rotate instructions.
...
llvm-svn: 74755
2009-07-03 01:43:10 +00:00
Andreas Bolka
195aca7d25
Minor improvement to the LDA debug output.
...
llvm-svn: 74754
2009-07-03 01:42:52 +00:00
Owen Anderson
6795819c9e
Second batch of passes using LLVMContext.
...
llvm-svn: 74753
2009-07-03 00:54:20 +00:00
Evan Cheng
f3672575d6
Add Thumb2 load / store multiple instructions. Not used yet.
...
llvm-svn: 74749
2009-07-03 00:18:36 +00:00
Owen Anderson
7fb95ff5dd
Convert the first batch of passes to use LLVMContext.
...
llvm-svn: 74748
2009-07-03 00:17:18 +00:00
Evan Cheng
07bcde3709
t2LDR_PRE etc are loads.
...
llvm-svn: 74741
2009-07-03 00:08:19 +00:00
Evan Cheng
162bd9cead
Added indexed stores.
...
llvm-svn: 74740
2009-07-03 00:06:39 +00:00
Owen Anderson
487dacd60c
Fill in a few more missing accessors.
...
llvm-svn: 74739
2009-07-02 23:58:19 +00:00
Evan Cheng
fcab8e743a
Sign extending pre/post indexed loads.
...
llvm-svn: 74736
2009-07-02 23:16:11 +00:00
Chris Lattner
d49e5380ec
switch the .ll parser to use SourceMgr.
...
llvm-svn: 74735
2009-07-02 23:08:13 +00:00
Chris Lattner
739a32b190
switch the .ll parser into SMDiagnostic.
...
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Devang Patel
5f93a737f6
Simplify debug info intrisinc lowering.
...
llvm-svn: 74733
2009-07-02 22:43:26 +00:00
Chris Lattner
1e3e84eb39
add an explicit class for holding llvm::SourceMgr diagnostics and use
...
it to print them. This gives us column numbers in the diag line. Before:
t.s:4: error: unexpected token in argument list
mov %eax %edx
^
now:
t.s:4:11: error: unexpected token in argument list
mov %eax %edx
^
llvm-svn: 74732
2009-07-02 22:24:20 +00:00
David Goodwin
81075a5d30
Checkpoint refactoring of ThumbInstrInfo and ThumbRegisterInfo into Thumb1InstrInfo, Thumb2InstrInfo, Thumb1RegisterInfo and Thumb2RegisterInfo. Move methods from ARMInstrInfo to ARMBaseInstrInfo to prepare for sharing with Thumb2.
...
llvm-svn: 74731
2009-07-02 22:18:33 +00:00
Douglas Gregor
b523a25108
CMake build fixes, from Xerxes Ranby
...
llvm-svn: 74720
2009-07-02 18:53:52 +00:00
Bruno Cardoso Lopes
810ef07890
shrinking down #includes
...
llvm-svn: 74718
2009-07-02 18:29:24 +00:00
Owen Anderson
5c79283f31
Add an accessor to Function so that Passes can easily get access to the context.
...
llvm-svn: 74714
2009-07-02 18:03:58 +00:00
Owen Anderson
4c1647bc63
Use LLVMContext for generating MDStrings too.
...
llvm-svn: 74710
2009-07-02 17:28:30 +00:00
Owen Anderson
ea0b9b58ae
Use LLVMContext to generate metadata constants.
...
llvm-svn: 74708
2009-07-02 17:20:28 +00:00
Owen Anderson
14f56adbcb
Add accessors for metadata constants.
...
llvm-svn: 74707
2009-07-02 17:19:47 +00:00
Devang Patel
5a12c3ba50
Fix typo.
...
Thanks Duncan!
llvm-svn: 74706
2009-07-02 17:17:03 +00:00
Owen Anderson
39d4fb4bc0
Add accessor for MDNode.
...
llvm-svn: 74705
2009-07-02 17:12:48 +00:00
Owen Anderson
bd328c24a0
Use LLVMContext for generating UndefValue constants too!
...
llvm-svn: 74703
2009-07-02 17:04:01 +00:00
Owen Anderson
22a2606666
Add accessor for getting UndefValue's.
...
llvm-svn: 74702
2009-07-02 16:51:51 +00:00
Chris Lattner
2586a96424
simplify some logic by using isWeakForLinker(). Thanks to Anton for
...
pointing this out.
llvm-svn: 74700
2009-07-02 16:08:53 +00:00
Chris Lattner
54c0359890
do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
...
we could do this, doing so requires adjusting the demanded mask and the code isn't
doing that yet. This fixes PR4495
llvm-svn: 74699
2009-07-02 16:04:08 +00:00
Chris Lattner
3d8ec50f8a
fix inverted logic pointed out by John McCall, noticed by inspection.
...
This was considering vector intrinsics to have cost 2, but non-vector
intrinsics to have cost 1, which is backward.
llvm-svn: 74698
2009-07-02 15:39:39 +00:00
Duncan Sands
961ee9b54e
Fix windows build, patch by Howard Su.
...
llvm-svn: 74697
2009-07-02 12:09:50 +00:00
Evan Cheng
dad6a41d14
Thumb2 pre/post indexed loads.
...
llvm-svn: 74696
2009-07-02 07:28:31 +00:00
Owen Anderson
4ddc0eaff0
Ack, missed one incompatibility.
...
llvm-svn: 74695
2009-07-02 07:21:49 +00:00
Owen Anderson
d9c962c065
Restore other bits of the C API that I tore up. All pre-existing APIs default to using the
...
default global context, while new *InContext() APIs have been added that take a LLVMContextRef parameter.
Apologies to anyone affected by this breakage.
llvm-svn: 74694
2009-07-02 07:17:57 +00:00
Evan Cheng
7249bab8a5
80 col violation.
...
llvm-svn: 74693
2009-07-02 06:44:30 +00:00
Evan Cheng
57bb186a0c
Change the meaning of predicate hasThumb2 to mean thumb2 ISA is available, not that it's in thumb mode and thumb2 is available. Added isThumb2 predicate to replace the old predicate.
...
llvm-svn: 74692
2009-07-02 06:38:40 +00:00
Chris Lattner
4cddab0f14
@GOTPCREL is also rip-relative. Fix fast-isel to do the right thing.
...
This fixes an llvm-gcc bootstrap problem I introduced.
llvm-svn: 74691
2009-07-02 04:22:01 +00:00
Chris Lattner
e703feb0ac
Fix yet-another bug I introduced into fastisel, this time handling
...
constant pool references that weren't getting properly rip-relative.
llvm-svn: 74689
2009-07-02 03:14:25 +00:00
Bruno Cardoso Lopes
bd4ae81317
Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
...
llvm-svn: 74686
2009-07-02 02:13:13 +00:00
Evan Cheng
bdf117bfac
80 col violation.
...
llvm-svn: 74683
2009-07-02 01:30:04 +00:00
Chris Lattner
da2b9a258f
clarify: stub emission depends on the version of the linker you use, it has nothing
...
to do with the target. Also, the stub elimination optimization *requires* making the
stub explicit.
llvm-svn: 74682
2009-07-02 01:24:34 +00:00
Evan Cheng
d9f23ceeb9
Factor out ARM indexed load matching code.
...
llvm-svn: 74681
2009-07-02 01:23:32 +00:00
Devang Patel
8726708137
Add debug info utility routines.
...
llvm-svn: 74680
2009-07-02 01:15:24 +00:00
Devang Patel
735f7d53ca
Simplify.
...
llvm-svn: 74677
2009-07-02 00:28:03 +00:00
Dan Gohman
e89dc58a7e
Fix a bunch of other places that used operator[] to test whether
...
a key is present in a std::map or DenseMap to use find instead.
llvm-svn: 74676
2009-07-02 00:17:47 +00:00
Owen Anderson
c232db28cf
Add a C wrapper for accessing the global default context.
...
llvm-svn: 74675
2009-07-02 00:16:38 +00:00
Devang Patel
2e373cdc9f
Simplify. No intentional functionality change.
...
llvm-svn: 74673
2009-07-02 00:08:09 +00:00
Owen Anderson
110917b453
Try again at converting the LLParser to use LLVMContext, without massive breakage this time.
...
llvm-svn: 74671
2009-07-01 23:57:11 +00:00
Owen Anderson
86578a9076
Add a few methods that got left out earlier.
...
llvm-svn: 74670
2009-07-01 23:56:45 +00:00
Dale Johannesen
edbdfb50e3
Add darwin stub removal to wishlist.
...
llvm-svn: 74667
2009-07-01 23:36:02 +00:00
Dan Gohman
499f79ba60
Request LCSSA after LoopSimplify. This fixes a problem in which the
...
PassManager was scheduling LCSSA before LoopSimplify, which does not
preserve LCSSA.
llvm-svn: 74661
2009-07-01 23:21:38 +00:00
Devang Patel
1fececd8c1
Refactor. No functionality change.
...
llvm-svn: 74659
2009-07-01 23:19:01 +00:00
Bob Wilson
810a970c6f
Add a new addressing mode for NEON load/store instructions.
...
llvm-svn: 74658
2009-07-01 23:16:05 +00:00
Owen Anderson
4fa7e54329
Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
...
moment, that I will need to make far-reaching changes.
llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Dan Gohman
7efbe6a243
Use find instead of operator[] to test whether an element is in a std::map.
...
This fixes a bug that caused -debug-pass=Details to abort.
llvm-svn: 74654
2009-07-01 23:12:33 +00:00
Bill Wendling
cbd3f64f54
--- Reverse-merging (from foreign repository) r74648 into '.':
...
U include/llvm/LLVMContext.h
U lib/VMCore/LLVMContext.cpp
U lib/AsmParser/LLParser.cpp
U lib/AsmParser/LLParser.h
Temporarily reverting r74648. It was causing massive failures in release mode.
llvm-svn: 74653
2009-07-01 22:33:26 +00:00
Devang Patel
0349a19e60
Keep DIDescriptor methods together.
...
No functionality change.
llvm-svn: 74652
2009-07-01 22:10:23 +00:00
Bob Wilson
e3f8a640ac
Fix a comment typo.
...
llvm-svn: 74650
2009-07-01 21:59:43 +00:00
Owen Anderson
93253cd222
Fix typo.
...
llvm-svn: 74649
2009-07-01 21:58:14 +00:00
Owen Anderson
b70b5ab513
Convert LLParser to use LLVMContext for creating constants.
...
llvm-svn: 74648
2009-07-01 21:57:44 +00:00
Andreas Bolka
3ba7d77eff
Use AA to check objects before LDA.
...
llvm-svn: 74647
2009-07-01 21:45:23 +00:00
Dan Gohman
e3b1f9e14b
Fix an instcombine abort on a scalar-to-vector bitcast. This fixes PR4487.
...
llvm-svn: 74646
2009-07-01 21:38:46 +00:00
Daniel Dunbar
8247f1ffe2
Tweak FindExecutable so that relative executable paths work as well.
...
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Bob Wilson
11cddb5deb
Fix up a comment: besides the >80col lines, the operation for this
...
addressing mode is encoded in the second operand, not the third.
llvm-svn: 74641
2009-07-01 21:22:45 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Devang Patel
d038bc5fbc
Fix metadata unittests
...
llvm-svn: 74638
2009-07-01 20:59:15 +00:00
Devang Patel
e5b9558412
Do not print stranded metadata.
...
llvm-svn: 74632
2009-07-01 19:39:39 +00:00
Devang Patel
905d32435c
Support stand alone metadata syntax.
...
!0 = constant metadata !{i32 21, i32 22}
@llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0}
llvm-svn: 74630
2009-07-01 19:21:12 +00:00
Devang Patel
9149c185a4
llvm.dbg.declare is always used for local variable's debug info.
...
llvm-svn: 74625
2009-07-01 18:51:07 +00:00
Bill Wendling
fdd5badace
Update comments to make it clear that the function alignment is the Log2 of the
...
bytes and not bytes.
llvm-svn: 74624
2009-07-01 18:50:55 +00:00
Jeffrey Yasskin
29ea777c1e
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
fbe8d883a0
I give up on trying to use reader/writer locks for recursive type refinement. Use a recursive mutex instead, which will (in theory) generate more contention, but is really
...
a much more natural fit for what's going on during recursive type refinement.
llvm-svn: 74618
2009-07-01 17:22:27 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
...
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Chris Lattner
b51c7950bf
Fix codegen for references to available_externally symbols. This fixes
...
PR4482.
llvm-svn: 74613
2009-07-01 16:53:44 +00:00
Owen Anderson
250c7e1a54
Try again at making this work on OpenBSD.
...
llvm-svn: 74612
2009-07-01 16:19:23 +00:00
Daniel Dunbar
2b25b9ba77
Fix FindExecutable to work if given an absolute executable path name.
...
- Patch by Viktor Kutuzov, with tweaks by me.
llvm-svn: 74608
2009-07-01 15:26:13 +00:00
Evan Cheng
e6989735a6
CommuteChangesDestination() should check if to-be-commuted instruction defines any register. Also teaches the default commuteInstruction() to commute instruction without definitions (e.g. X86::test / ARM::tsp).
...
llvm-svn: 74602
2009-07-01 08:29:08 +00:00
Evan Cheng
7d78cb531e
Remove special handling of implicit_def. Fix a couple more bugs in liveintervalanalysis and coalescer handling of implicit_def.
...
Note, isUndef marker must be placed even on implicit_def def operand or else the scavenger will not ignore it. This is necessary because -O0 path does not use liveintervalanalysis, it treats implicit_def just like any other def.
llvm-svn: 74601
2009-07-01 08:19:36 +00:00
Owen Anderson
a006b0212a
Fix the build on OpenBSD.
...
llvm-svn: 74597
2009-07-01 06:53:29 +00:00
Daniel Dunbar
efcb5ad32e
Dump MCInsts in the MC .s printer, for now.
...
llvm-svn: 74593
2009-07-01 06:35:03 +00:00
Chris Lattner
4bdaace06e
improve the APIs for creating struct and function types with no arguments/elements
...
to not have to create a temporary vector (in the API at least). Patch by Jay Foad!
llvm-svn: 74584
2009-07-01 04:13:31 +00:00
Chris Lattner
2bbdc61f92
Fix some fast-isel problems selecting global variable addressing in
...
pic mode.
llvm-svn: 74582
2009-07-01 03:27:19 +00:00
Evan Cheng
37503e9671
Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details.
...
llvm-svn: 74580
2009-07-01 01:59:31 +00:00
Daniel Dunbar
bc3d149e98
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
David Goodwin
19aa5c7d51
Add PIC load and store patterns for Thumb-2.
...
llvm-svn: 74577
2009-07-01 00:01:13 +00:00
Owen Anderson
7e570cd684
Add a global context, for easing backwards compatibility.
...
llvm-svn: 74574
2009-06-30 23:39:59 +00:00
David Goodwin
aa1f876954
Thumb-2 load and store double description. But nothing yet creates them.
...
llvm-svn: 74566
2009-06-30 22:50:01 +00:00
Bill Wendling
c0fb316bd3
Add an "alignment" field to the MachineFunction object. It makes more sense to
...
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
llvm-svn: 74564
2009-06-30 22:38:32 +00:00
David Goodwin
5805e9aef5
Add thumb-2 store word, halfword, and byte.
...
llvm-svn: 74555
2009-06-30 22:11:34 +00:00
Dan Gohman
b3c5210779
Minor code cleanups.
...
llvm-svn: 74551
2009-06-30 20:13:32 +00:00
Dan Gohman
148d3bb9b4
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
David Goodwin
aad223dd8a
Improve Thumb-2 jump table support.
...
llvm-svn: 74549
2009-06-30 19:50:22 +00:00
David Greene
c702ce1ab3
Add 256-bit memory operand support.
...
llvm-svn: 74548
2009-06-30 19:24:59 +00:00
David Goodwin
5545d82866
Add conditional and unconditional thumb-2 branch. Add thumb-2 jump table.
...
llvm-svn: 74543
2009-06-30 18:04:13 +00:00
Owen Anderson
0b1cd834ef
Add wrappers for type construction to LLVMContext.
...
llvm-svn: 74542
2009-06-30 17:50:28 +00:00