Bruno Cardoso Lopes
5661ea68e7
Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
...
cleanup, removed some #includes and moved Object Code Emitter out-of-line.
llvm-svn: 74813
2009-07-06 05:09:34 +00:00
Owen Anderson
605a8c743f
More LLVMContext-ification.
...
llvm-svn: 74811
2009-07-06 01:34:54 +00:00
Oscar Fuentes
c296b89d51
CMake: Fixes previous change: CMAKE_BUILD_TYPE is unknown when
...
generating project files for MSVC.
llvm-svn: 74809
2009-07-05 23:58:20 +00:00
Owen Anderson
e70b637033
More LLVMContext-ification.
...
llvm-svn: 74807
2009-07-05 22:41:43 +00:00
Nick Lewycky
d687b0380c
There are five floating point types.
...
llvm-svn: 74806
2009-07-05 22:35:49 +00:00
Nick Lewycky
4f8d9eeadc
There are *four* lights!
...
llvm-svn: 74804
2009-07-05 22:23:28 +00:00
Oscar Fuentes
5674531255
CMake: Avoids defining _DEBUG on MSVC Release builds. Fixes PR 4379.
...
llvm-svn: 74794
2009-07-05 18:43:52 +00:00
Duncan Sands
78cd3e5472
Clarify that later compiler versions are known to
...
fail to build the Ada front-end.
llvm-svn: 74793
2009-07-05 12:01:44 +00:00
Nick Lewycky
3292908132
When comparing constants, consider a less wide constant to be "less complex"
...
than a wider one, before trying to compare their contents which will crash
if their sizes are different.
llvm-svn: 74792
2009-07-04 17:24:52 +00:00
Jeffrey Yasskin
ca6d224d71
Have cmake define HAVE_STRERROR and friends to 1 when they're defined at all.
...
llvm-svn: 74791
2009-07-04 16:37:12 +00:00
Mikhail Glushenkov
4f0fa1539c
Make -save-temps=obj play better with -o.
...
Use only the *dirname* of the pathname given to -o, so that -o can still be used
to name the output executable. This is more like what GCC 4.5 does.
llvm-svn: 74790
2009-07-04 14:23:32 +00:00
Mikhail Glushenkov
9297a52715
Regenerate.
...
llvm-svn: 74789
2009-07-04 14:23:08 +00:00
Mikhail Glushenkov
95bac6f77c
LLVMC can be now compiled w/o dynamic plugin support.
...
Controlled via the --enable-llvmc-dynamic-plugins option.
llvm-svn: 74784
2009-07-04 03:55:25 +00:00
Mikhail Glushenkov
29d06ea46c
LLVMC doesn't need ENABLE_PIC to build now.
...
llvm-svn: 74783
2009-07-04 03:54:54 +00:00
Mike Stump
bbd8707f6e
Fix build.
...
llvm-svn: 74782
2009-07-03 22:11:58 +00:00
Owen Anderson
340288c621
Even more passes being LLVMContext'd.
...
llvm-svn: 74781
2009-07-03 19:42:02 +00:00
Nick Lewycky
cb23509546
Add Static Single Information construction pass written by André Tavares!
...
Use it by requiring it through the pass manager, then calling its createSSI
method on the variables that you want in SSI form.
llvm-svn: 74780
2009-07-03 19:28:36 +00:00
Duncan Sands
cac07a4cb7
Silence a warning when assertions are turned off.
...
llvm-svn: 74779
2009-07-03 16:11:59 +00:00
Duncan Sands
c3f89b3fbb
Silence a warning when assertions are turned off.
...
llvm-svn: 74778
2009-07-03 16:11:34 +00:00
Duncan Sands
075276e9ce
Silence warning when building without assertions.
...
llvm-svn: 74777
2009-07-03 16:06:07 +00:00
Duncan Sands
5a16986cfc
Silence warnings when assertions are turned off.
...
llvm-svn: 74776
2009-07-03 16:03:33 +00:00
Duncan Sands
ca5303fd1c
In this unreachable code, return an initialized value.
...
This stops gcc warning about possible uses of an uninitialized
value when compiling with assertions turned off.
llvm-svn: 74775
2009-07-03 16:00:23 +00:00
Duncan Sands
31554aba47
Add newline at end of file.
...
llvm-svn: 74774
2009-07-03 15:38:01 +00:00
Duncan Sands
29c8efce31
Add newline at end of file.
...
llvm-svn: 74773
2009-07-03 15:30:58 +00:00
Torok Edwin
f011f28767
Fix typo: intepreter->interpreter.
...
llvm-svn: 74770
2009-07-03 12:11:32 +00:00
Duncan Sands
f1fb654eb3
Fix the build: provide uint8_t.
...
llvm-svn: 74769
2009-07-03 08:12:51 +00:00
Sanjiv Gupta
a587ffe12d
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
9db3e70056
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
773f14c008
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
b93960d779
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
aea6059ed4
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
98bdaaa3ee
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
95dd8657ca
Factor some code out and support for Jump Table relocations
...
llvm-svn: 74760
2009-07-03 04:36:26 +00:00
Mikhail Glushenkov
d6c39ae68c
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
Mikhail Glushenkov
d871cbcd5b
Trailing whitespace.
...
llvm-svn: 74758
2009-07-03 03:52:07 +00:00
Evan Cheng
0e8bde5910
Add thumb2 sign / zero extend with rotate instructions.
...
llvm-svn: 74755
2009-07-03 01:43:10 +00:00
Andreas Bolka
1cd3fd6336
Minor improvement to the LDA debug output.
...
llvm-svn: 74754
2009-07-03 01:42:52 +00:00
Owen Anderson
80baed63b4
Second batch of passes using LLVMContext.
...
llvm-svn: 74753
2009-07-03 00:54:20 +00:00
Evan Cheng
6d9041100b
Add Thumb2 load / store multiple instructions. Not used yet.
...
llvm-svn: 74749
2009-07-03 00:18:36 +00:00
Owen Anderson
b5618da226
Convert the first batch of passes to use LLVMContext.
...
llvm-svn: 74748
2009-07-03 00:17:18 +00:00
Daniel Dunbar
38a22bffdc
Replace std::iostreams with raw_ostream in TableGen.
...
- Sorry, I can't help myself.
- No intended functionality change.
llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Evan Cheng
f30ee8820a
t2LDR_PRE etc are loads.
...
llvm-svn: 74741
2009-07-03 00:08:19 +00:00
Evan Cheng
53cdf022b6
Added indexed stores.
...
llvm-svn: 74740
2009-07-03 00:06:39 +00:00
Owen Anderson
39a7aed050
Fill in a few more missing accessors.
...
llvm-svn: 74739
2009-07-02 23:58:19 +00:00
Evan Cheng
8ecd7eb3f7
Sign extending pre/post indexed loads.
...
llvm-svn: 74736
2009-07-02 23:16:11 +00:00
Chris Lattner
200e0757c7
switch the .ll parser to use SourceMgr.
...
llvm-svn: 74735
2009-07-02 23:08:13 +00:00
Chris Lattner
a76611a535
switch the .ll parser into SMDiagnostic.
...
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Devang Patel
87127712b9
Simplify debug info intrisinc lowering.
...
llvm-svn: 74733
2009-07-02 22:43:26 +00:00
Chris Lattner
cc64cc9313
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
ade05a37f1
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
Chris Lattner
73f3611be9
implement error recovery in the llvm-mc parser. Feel the power!
...
llvm-svn: 74728
2009-07-02 21:53:43 +00:00
Owen Anderson
7c5c11f87d
Make the current LLVMContext available to passes.
...
llvm-svn: 74724
2009-07-02 20:23:41 +00:00
Douglas Gregor
6141511621
CMake build fixes, from Xerxes Ranby
...
llvm-svn: 74720
2009-07-02 18:53:52 +00:00
Bruno Cardoso Lopes
6dca2847d9
shrinking down #includes
...
llvm-svn: 74718
2009-07-02 18:29:24 +00:00
Owen Anderson
0a2c458ae0
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
Sanjiv Gupta
6c41ac5b38
Prefix bin dir to executables.
...
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Devang Patel
676efa092c
Remove tabs.
...
llvm-svn: 74712
2009-07-02 17:39:40 +00:00
Sanjiv Gupta
2b65d1aac1
Fixed handling of -c option.wq
...
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Owen Anderson
ac7334c1cf
Use LLVMContext for generating MDStrings too.
...
llvm-svn: 74710
2009-07-02 17:28:30 +00:00
Owen Anderson
29ec3e0e50
Use LLVMContext to generate metadata constants.
...
llvm-svn: 74708
2009-07-02 17:20:28 +00:00
Owen Anderson
fea7ae88c9
Add accessors for metadata constants.
...
llvm-svn: 74707
2009-07-02 17:19:47 +00:00
Devang Patel
526b17097a
Fix typo.
...
Thanks Duncan!
llvm-svn: 74706
2009-07-02 17:17:03 +00:00
Owen Anderson
e792c90fd1
Add accessor for MDNode.
...
llvm-svn: 74705
2009-07-02 17:12:48 +00:00
Owen Anderson
09063cec4e
Use LLVMContext for generating UndefValue constants too!
...
llvm-svn: 74703
2009-07-02 17:04:01 +00:00
Owen Anderson
f85afb2591
Add accessor for getting UndefValue's.
...
llvm-svn: 74702
2009-07-02 16:51:51 +00:00
Owen Anderson
6b92174dda
Describe the LLVMContext API change.
...
llvm-svn: 74701
2009-07-02 16:48:38 +00:00
Chris Lattner
ccfb5105eb
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
edb8407f0c
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
f3f6aaa2c3
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
f9cf4ffcc7
Fix windows build, patch by Howard Su.
...
llvm-svn: 74697
2009-07-02 12:09:50 +00:00
Evan Cheng
84c6cda2ef
Thumb2 pre/post indexed loads.
...
llvm-svn: 74696
2009-07-02 07:28:31 +00:00
Owen Anderson
2de0067e60
Ack, missed one incompatibility.
...
llvm-svn: 74695
2009-07-02 07:21:49 +00:00
Owen Anderson
31d44e4904
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
844f0b4562
80 col violation.
...
llvm-svn: 74693
2009-07-02 06:44:30 +00:00
Evan Cheng
2c450d35ae
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
87bb642676
@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
d1c5951615
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
Daniel Dunbar
a065149f39
llvm-mc/x86: Test case for x86 operand parsing.
...
llvm-svn: 74688
2009-07-02 02:28:23 +00:00
Daniel Dunbar
0224b65f0a
llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
...
- Test case to follow.
llvm-svn: 74687
2009-07-02 02:26:39 +00:00
Bruno Cardoso Lopes
eefbf1961c
Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
...
llvm-svn: 74686
2009-07-02 02:13:13 +00:00
Daniel Dunbar
9bff6531fd
llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
...
(I think).
- We weren't properly parsing the leading parenthesized expression in something
like 'push (4)(%eax)'.
- Added ParseParenRelocatableExpression to support this. I suspect we should
just use lookahead, though.
- Test case to follow.
llvm-svn: 74685
2009-07-02 02:09:07 +00:00
Daniel Dunbar
36a2007059
llvm-mc/x86: Factor out ParseX86Register.
...
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Evan Cheng
979da0e590
80 col violation.
...
llvm-svn: 74683
2009-07-02 01:30:04 +00:00
Chris Lattner
4ec83ea628
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
d9c55368e7
Factor out ARM indexed load matching code.
...
llvm-svn: 74681
2009-07-02 01:23:32 +00:00
Devang Patel
bbf38f8f3b
Add debug info utility routines.
...
llvm-svn: 74680
2009-07-02 01:15:24 +00:00
Daniel Dunbar
142f104b29
llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
...
with syntax.
llvm-svn: 74679
2009-07-02 00:51:52 +00:00
Owen Anderson
0ff993839c
Maintain the old LTO API, by using the global context.
...
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Devang Patel
6bab414f87
Simplify.
...
llvm-svn: 74677
2009-07-02 00:28:03 +00:00
Dan Gohman
43f33dd550
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
f7691d398d
Add a C wrapper for accessing the global default context.
...
llvm-svn: 74675
2009-07-02 00:16:38 +00:00
John Mosby
f4f2f14f57
fix ld error with -no-undefined switch, which is undefined on darwin8
...
llvm-svn: 74674
2009-07-02 00:10:23 +00:00
Devang Patel
846a5e4d3e
Simplify. No intentional functionality change.
...
llvm-svn: 74673
2009-07-02 00:08:09 +00:00
Owen Anderson
02a9da33b3
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
7d12807ef0
Add a few methods that got left out earlier.
...
llvm-svn: 74670
2009-07-01 23:56:45 +00:00
Daniel Dunbar
84190f9a4d
Try to clarify a point about getting DominatorTree info from a module pass.
...
llvm-svn: 74668
2009-07-01 23:38:44 +00:00
Dale Johannesen
4e6044c405
Add darwin stub removal to wishlist.
...
llvm-svn: 74667
2009-07-01 23:36:02 +00:00
Owen Anderson
54648d867f
Fix the LTO header for LLVMContext changes.
...
llvm-svn: 74663
2009-07-01 23:28:55 +00:00
Dan Gohman
cf092389a9
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
53d24bc7d6
Refactor. No functionality change.
...
llvm-svn: 74659
2009-07-01 23:19:01 +00:00
Bob Wilson
deb35afd23
Add a new addressing mode for NEON load/store instructions.
...
llvm-svn: 74658
2009-07-01 23:16:05 +00:00
Owen Anderson
2a15443aa8
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
83ff184206
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
4534d2562b
--- 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
b9fb595400
Keep DIDescriptor methods together.
...
No functionality change.
llvm-svn: 74652
2009-07-01 22:10:23 +00:00
Bob Wilson
affb68bd08
Fix a comment typo.
...
llvm-svn: 74650
2009-07-01 21:59:43 +00:00
Owen Anderson
91b5e630a9
Fix typo.
...
llvm-svn: 74649
2009-07-01 21:58:14 +00:00
Owen Anderson
7373c6bbd6
Convert LLParser to use LLVMContext for creating constants.
...
llvm-svn: 74648
2009-07-01 21:57:44 +00:00
Andreas Bolka
394b4156cf
Use AA to check objects before LDA.
...
llvm-svn: 74647
2009-07-01 21:45:23 +00:00
Dan Gohman
83348f80b6
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
4aef67c99d
Tweak FindExecutable so that relative executable paths work as well.
...
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Devang Patel
f206e4444b
Add getMDNode() to access metadata node.
...
llvm-svn: 74644
2009-07-01 21:26:41 +00:00
Bob Wilson
bbbf805049
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
1cf085d558
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Devang Patel
5546b98d07
Fix metadata unittests
...
llvm-svn: 74638
2009-07-01 20:59:15 +00:00
Devang Patel
461f2bdcbe
new test case
...
llvm-svn: 74633
2009-07-01 19:40:59 +00:00
Devang Patel
de91b9e292
Do not print stranded metadata.
...
llvm-svn: 74632
2009-07-01 19:39:39 +00:00
Devang Patel
39e64d452a
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
c41959534d
Add machine operand for MDNodes. This will be used to communicate debug info.
...
llvm-svn: 74628
2009-07-01 19:08:07 +00:00
Devang Patel
ea76e08645
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
512ff7353e
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
246676db7d
Update configure and config.h.in from r74621.
...
llvm-svn: 74623
2009-07-01 18:30:10 +00:00
Owen Anderson
8bc174aef7
Fix unit tests for LLVMContext+Module.
...
llvm-svn: 74622
2009-07-01 18:14:20 +00:00
Jeffrey Yasskin
1a93330ffa
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
Misha Brukman
702e817733
Use correct format for LLVM header #includes.
...
llvm-svn: 74620
2009-07-01 17:51:56 +00:00
Owen Anderson
e722976d54
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
6773d388aa
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
1f50b61329
Fix codegen for references to available_externally symbols. This fixes
...
PR4482.
llvm-svn: 74613
2009-07-01 16:53:44 +00:00
Owen Anderson
02c4de3573
Try again at making this work on OpenBSD.
...
llvm-svn: 74612
2009-07-01 16:19:23 +00:00
Sanjiv Gupta
8ff5a6c262
Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
...
llvm-svn: 74611
2009-07-01 16:10:29 +00:00
Stuart Hastings
67a2b76774
Insure that __block_holder_tmp is allocated on the stack when a byref
...
variable is present.
llvm-svn: 74610
2009-07-01 15:40:10 +00:00
Daniel Dunbar
b8f779db87
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
Daniel Dunbar
b442e04259
llvm-mc: Add some more doxyments.
...
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
8d856c89b7
NewNightlyTest: Include minutes/seconds in log file names, to support running
...
multiple runs per day (insane, I know).
Also, remove some unused variables.
llvm-svn: 74605
2009-07-01 14:52:59 +00:00
Misha Brukman
89141b5a79
Added step-by-step directions on how to use the script to build and install an
...
x86_64/Linux -> ARM/Linux crosstool.
llvm-svn: 74603
2009-07-01 13:51:59 +00:00
Evan Cheng
04f72fc955
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
2a5efe14a7
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
Daniel Dunbar
1cc14c3f3d
Tweak MCSymbol doxyments.
...
llvm-svn: 74599
2009-07-01 07:03:41 +00:00
Daniel Dunbar
9c4809a887
llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
...
llvm-svn: 74598
2009-07-01 06:56:54 +00:00
Owen Anderson
cb86e113a9
Fix the build on OpenBSD.
...
llvm-svn: 74597
2009-07-01 06:53:29 +00:00
Daniel Dunbar
0d5fc9a5b0
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
e4dfc89615
add some of the new tokens, others are still missing.
...
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
fc35841077
llvm-mc: Emit parsed instructions to the MCStreamer.
...
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
23a72aa476
Dump MCInsts in the MC .s printer, for now.
...
llvm-svn: 74593
2009-07-01 06:35:03 +00:00
Chris Lattner
c5327c81d8
add comments, privatize interface
...
llvm-svn: 74592
2009-07-01 06:31:49 +00:00
Chris Lattner
0420d7cb22
disable some ctors.
...
llvm-svn: 74591
2009-07-01 06:23:14 +00:00
Chris Lattner
1d70bbcf5c
add some comments to MCSymbol header, make the ctor private so that only MCContext can create these.
...
llvm-svn: 74590
2009-07-01 06:21:53 +00:00
Chris Lattner
fceae7d194
improve comments.
...
llvm-svn: 74589
2009-07-01 06:08:37 +00:00
Chris Lattner
96122debc1
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
f95fa1b721
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
d379e896ff
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
75c12e1569
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
86c7e20ca6
Add PIC load and store patterns for Thumb-2.
...
llvm-svn: 74577
2009-07-01 00:01:13 +00:00
Owen Anderson
1938fb1954
Add a global context, for easing backwards compatibility.
...
llvm-svn: 74574
2009-06-30 23:39:59 +00:00
Daniel Dunbar
d0a08e0430
llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
...
llvm-svn: 74573
2009-06-30 23:38:38 +00:00
Daniel Dunbar
d6ea0300e4
Fill in some methods for the MCValue field of an MCOperand.
...
llvm-svn: 74572
2009-06-30 23:37:44 +00:00
Daniel Dunbar
cfcdf5c1ac
llvm-mc: Accept relocatable expressions when parsing displacements and
...
immediates.
llvm-svn: 74568
2009-06-30 23:02:44 +00:00
David Goodwin
a83100f687
Thumb-2 load and store double description. But nothing yet creates them.
...
llvm-svn: 74566
2009-06-30 22:50:01 +00:00
Daniel Dunbar
8561b6aea0
llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
...
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.
llvm-svn: 74565
2009-06-30 22:49:27 +00:00
Bill Wendling
31ceb1bcba
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
d0890a2bad
Add thumb-2 store word, halfword, and byte.
...
llvm-svn: 74555
2009-06-30 22:11:34 +00:00
Andreas Bolka
e415f52997
Drop redundant print impl.
...
llvm-svn: 74553
2009-06-30 21:33:56 +00:00
Dan Gohman
3423e72b55
Minor code cleanups.
...
llvm-svn: 74551
2009-06-30 20:13:32 +00:00
Dan Gohman
10f1733d9a
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
28d6d87244
Improve Thumb-2 jump table support.
...
llvm-svn: 74549
2009-06-30 19:50:22 +00:00
David Greene
50475de6af
Add 256-bit memory operand support.
...
llvm-svn: 74548
2009-06-30 19:24:59 +00:00
David Goodwin
27303cde82
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
a8560219c7
Add wrappers for type construction to LLVMContext.
...
llvm-svn: 74542
2009-06-30 17:50:28 +00:00
Chris Lattner
c4501d5242
add a FAQ.
...
llvm-svn: 74538
2009-06-30 17:10:19 +00:00
Owen Anderson
36f62e5df6
Fix up header comments to make Chris happy.
...
llvm-svn: 74537
2009-06-30 17:06:46 +00:00
Rafael Espindola
317fd045e2
Fix PR4485.
...
Avoid unnecessary duplication of operand 0 of X86::FpSET_ST0_80. This duplication would
cause one register to remain on the stack at the function return.
llvm-svn: 74534
2009-06-30 16:40:03 +00:00
Daniel Dunbar
ec6fdb6750
Revert my intentional breakage.
...
llvm-svn: 74531
2009-06-30 16:26:57 +00:00
Daniel Dunbar
c9de159696
Intentionally break a unittest to test my buildbot gtest command.
...
- Apologies in advance for the noise.
llvm-svn: 74530
2009-06-30 16:11:58 +00:00
Daniel Dunbar
3971273aa2
Suppress may-be-used-uninitialized warning.
...
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
16f652876f
Fix CMake build
...
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Oscar Fuentes
136f9a6512
Fixed assert that checks return value of TlsSetValue.
...
See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx
Patch by Olaf Krzikalla!
llvm-svn: 74526
2009-06-30 14:12:28 +00:00
Rafael Espindola
bd971ffcc6
Fix PR4484.
...
This was caused by me confounding FP0 and ST(0).
llvm-svn: 74523
2009-06-30 12:18:16 +00:00
Evan Cheng
dcf1f59305
Temporarily restore the scavenger implicit_def checking code. MachineOperand isUndef mark is not being put on implicit_def of physical registers (created for parameter passing, etc.).
...
llvm-svn: 74519
2009-06-30 09:19:42 +00:00
Evan Cheng
0dc101b897
Add a bit IsUndef to MachineOperand. This indicates the def / use register operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them.
...
The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing.
This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def.
llvm-svn: 74518
2009-06-30 08:49:04 +00:00
Bill Wendling
778a517725
Temporarily revert r74494. It was causing failures in the unit tests.
...
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Chris Lattner
67f2a4ac4e
got confused again
...
llvm-svn: 74514
2009-06-30 06:27:54 +00:00
Chris Lattner
6ad089cc54
fix some issues Jeff Yasskin noticed
...
llvm-svn: 74512
2009-06-30 06:20:03 +00:00
Chris Lattner
56c1094999
add a note about re-evaluating end() every time through a loop.
...
llvm-svn: 74511
2009-06-30 06:13:23 +00:00
Owen Anderson
00d07afe98
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Chris Lattner
b127c0684f
remove a bogus note.
...
llvm-svn: 74509
2009-06-30 05:22:31 +00:00
Chris Lattner
5ed255e642
add a note
...
llvm-svn: 74508
2009-06-30 04:20:46 +00:00
Bill Wendling
855263371a
#include <iostream> is forbidden. Remove it in favor of raw_ostream.
...
llvm-svn: 74507
2009-06-30 04:07:12 +00:00
Evan Cheng
57726817aa
A few more load instructions.
...
llvm-svn: 74500
2009-06-30 02:15:48 +00:00
Andreas Bolka
9541801105
Array accesses are independent if the underlying arrays differ.
...
llvm-svn: 74499
2009-06-30 02:12:10 +00:00
Daniel Dunbar
75630b355a
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
...
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
19f847fa68
llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
...
legally negate an MCValue.
llvm-svn: 74497
2009-06-30 02:08:27 +00:00
Daniel Dunbar
bd4bf3d4f7
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Dan Gohman
7013ca5434
Delete a spurious blank line at the top of the file.
...
llvm-svn: 74495
2009-06-30 01:29:09 +00:00
Dan Gohman
e95d409bdd
Define an operator<< for APInt to be used with std::ostream.
...
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.
llvm-svn: 74494
2009-06-30 01:28:08 +00:00
Dan Gohman
e8eca73cdd
Minor formatting, whitespace, and 80-column fixes.
...
llvm-svn: 74492
2009-06-30 01:25:30 +00:00
Dan Gohman
4dfc680059
Minor code simplification.
...
llvm-svn: 74491
2009-06-30 01:24:43 +00:00
David Goodwin
17512663f5
Enhance tests to include shifted-register operand testing.
...
llvm-svn: 74490
2009-06-30 01:02:20 +00:00
Daniel Dunbar
c9dc78ae40
Normalize SourceMgr messages.
...
- Don't print "Parsing" in front of every message.
- Take additional "type" argument which is prepended to the message (with ": ")
if given.
- Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...
llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Owen Anderson
8e66e0bab4
Add LLVMContext, which will eventually be used as a container for privatizing a lot of (currently) global state, including the
...
constant and type uniquing tables. For now, just make it a wrapper around the existing APIs.
llvm-svn: 74488
2009-06-30 00:48:55 +00:00
Daniel Dunbar
a5508c893a
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
7b366b5d47
Regenerate.
...
llvm-svn: 74485
2009-06-30 00:16:43 +00:00
Mikhail Glushenkov
8a4d713e48
Clang is now production quality (at least for C).
...
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
3fcdada6b4
Add a way to access argv[0] in hooks.
...
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Mikhail Glushenkov
f40b590721
Move the driver entry point out of Main.inc.
...
llvm-svn: 74482
2009-06-30 00:15:24 +00:00
Daniel Dunbar
cc566a714b
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Devang Patel
0a9f9759a3
Struct types are described using field types only.
...
llvm-svn: 74477
2009-06-29 23:46:50 +00:00
Daniel Dunbar
ae7ac01059
llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
...
- For example, we diagnose errors on:
--
a:
a = 10
--
- For now we reject code like:
--
.long a
a = 10
--
which "as" accepts (on Darwin).
llvm-svn: 74476
2009-06-29 23:43:14 +00:00
Daniel Dunbar
abe6f35c31
Add SMLoc::isValid method.
...
- To support using SMLoc as a sentinel.
llvm-svn: 74474
2009-06-29 23:28:55 +00:00
Daniel Dunbar
f71a0cca84
Fix install of libCompilerDriver dynamic library to not copy on every build.
...
llvm-svn: 74473
2009-06-29 22:59:36 +00:00
David Greene
371ca49bad
Remove commented code.
...
llvm-svn: 74471
2009-06-29 22:55:52 +00:00
David Greene
8adf1fdc80
Add a 256-bit register class and YMM registers.
...
llvm-svn: 74469
2009-06-29 22:50:51 +00:00
David Goodwin
76b37950ca
Add Thumb-2 support for TEQ amd TST.
...
llvm-svn: 74468
2009-06-29 22:49:42 +00:00
David Goodwin
911edef65b
Thumb-2 tests
...
llvm-svn: 74464
2009-06-29 22:25:22 +00:00
Daniel Dunbar
5992b4a211
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
6b22f9ca45
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Dan Gohman
9d203c636b
Use getSCEV instead of getUnknown to create a SCEV for a
...
Constant. This lets ConstantInts be handled as SCEVConstant instead
of SCEVUnknown, as getUnknown no longer has special-case code for
ConstantInt and friends. This usually doesn't affect the final
output, since the constants end up getting folded later, but it
does make intermediate expressions more obvious in many cases.
llvm-svn: 74459
2009-06-29 21:31:18 +00:00
Daniel Dunbar
231898baf5
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
fdbbc52cfd
Don't build LLVMC when configured with --disable-pic (it needs requires shared
...
module support to build).
llvm-svn: 74456
2009-06-29 21:12:26 +00:00
Torok Edwin
896556eec7
Set wasRun to false here on Dan's suggestion.
...
llvm-svn: 74455
2009-06-29 21:05:10 +00:00
Devang Patel
40d784180b
s/MainCU/ModuleCU/g
...
llvm-svn: 74452
2009-06-29 20:45:18 +00:00
Daniel Dunbar
84bfd7b184
MC: Improve expression parsing and implement evaluation of absolute expressions
...
(missed files).
llvm-svn: 74450
2009-06-29 20:40:36 +00:00
Devang Patel
8635345d8a
Multiple DW_TAG_compile_unit is not used, afaict, on any target.
...
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file.
llvm-svn: 74449
2009-06-29 20:38:13 +00:00
Daniel Dunbar
7e8d6c7215
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Dan Gohman
19d2417c90
Don't cache PHI exit values from exhaustive evaluations, because
...
an individual exhaustive evaluation reflects only the exit value
implied by an individual exit, which may differ from the actual
exit value of the loop if there are other exits. This fixes PR4477.
llvm-svn: 74447
2009-06-29 20:34:13 +00:00
Rafael Espindola
538064d6b1
FIX PR 4459.
...
Not sure I understand how the temp register gets used,
but this fixes a bug and introduces no regressions.
llvm-svn: 74446
2009-06-29 20:29:59 +00:00
David Greene
f71ee01c81
Add some tests of advanced TableGen list functionality.
...
llvm-svn: 74445
2009-06-29 20:07:17 +00:00
David Greene
efa19619c8
Implement !cast<string>.
...
llvm-svn: 74444
2009-06-29 20:05:29 +00:00
David Greene
fd42c8a567
Improve TableGen error reporting.
...
llvm-svn: 74443
2009-06-29 19:59:52 +00:00
Torok Edwin
6fb3e98eed
Initialize CurSection in constructor.
...
Not doing so causes some unittests to fail, because CurSection is uninitialized.
llvm-svn: 74442
2009-06-29 19:59:10 +00:00
Daniel Dunbar
7cbba368fb
Fix order of arguments to EXPECT_EQ
...
llvm-svn: 74441
2009-06-29 19:57:24 +00:00
Daniel Dunbar
a97615adf8
Rename MCValue::getCst to getConstant and add MCValue::isConstant.
...
llvm-svn: 74440
2009-06-29 19:51:00 +00:00
Andreas Bolka
6037bc9e60
Relax LDA memory instruction checks.
...
llvm-svn: 74439
2009-06-29 18:51:11 +00:00
Torok Edwin
24c7835d19
Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
...
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.
llvm-svn: 74438
2009-06-29 18:49:09 +00:00
Dan Gohman
e00beaaee8
Simplify this code, and avoid using APInt(). This fixes
...
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.
llvm-svn: 74437
2009-06-29 18:25:52 +00:00
Owen Anderson
45c299ef65
Add a target-specific DAG combine on X86 to fold the common pattern of
...
fence-atomic-fence down to just the atomic op. This is possible thanks to
X86's relatively strong memory model, which guarantees that locked instructions
(which are used to implement atomics) are implicit fences.
llvm-svn: 74435
2009-06-29 18:04:45 +00:00
Sebastian Redl
1257581438
Fix three MSVC 2008 warnings that completely clutter the build output.
...
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
David Greene
46b56ffae3
Add processor descriptions for Istanbul and Shanghai.
...
llvm-svn: 74429
2009-06-29 16:54:06 +00:00
David Greene
a4b8998fbb
Fix a subtarget feature bug.
...
llvm-svn: 74428
2009-06-29 16:51:01 +00:00
David Greene
f92ba97cda
Add more vector ValueTypes for AVX and other extended vector instruction
...
sets.
llvm-svn: 74427
2009-06-29 16:47:10 +00:00
Douglas Gregor
e081d90233
Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
...
llvm-svn: 74426
2009-06-29 16:25:22 +00:00
David Goodwin
dbf11ba800
Rename ARMcmpNZ to ARMcmpZ and use it to represent comparisons that set only the Z flag (i.e. eq and ne). Make ARMcmpZ commutative.
...
llvm-svn: 74423
2009-06-29 15:33:01 +00:00
Duncan Sands
14814d4477
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Duncan Sands
24a3724b04
Include the new file ThumbRegisterInfo.cpp to CMakeLists.txt
...
to make sure ThumbRegisterInfo.cpp are compiled and linked in.
Patch by Xerxes.
llvm-svn: 74421
2009-06-29 13:11:32 +00:00
Evan Cheng
b23b50d54d
Implement Thumb2 ldr.
...
After much back and forth, I decided to deviate from ARM design and split LDR into 4 instructions (r + imm12, r + imm8, r + r << imm12, constantpool). The advantage of this is 1) it follows the latest ARM technical manual, and 2) makes it easier to reduce the width of the instruction later. The down side is this creates more inconsistency between the two sub-targets. We should split ARM LDR instruction in a similar fashion later. I've added a README entry for this.
llvm-svn: 74420
2009-06-29 07:51:04 +00:00
Mikhail Glushenkov
72f3f7eb56
Make dynamic LLVMC plugins work on Windows (finally!).
...
Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.
llvm-svn: 74417
2009-06-29 03:09:15 +00:00
Andreas Bolka
3a09c8bd5e
Missed one.
...
llvm-svn: 74416
2009-06-29 00:53:49 +00:00
Andreas Bolka
c5558a83f4
Fix case in LDA util function names.
...
llvm-svn: 74415
2009-06-29 00:50:26 +00:00
Andreas Bolka
9d09e20142
Print pairwise dependence results, add testcases.
...
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Andreas Bolka
9fee7f86ad
Minimal LDA interface, maximally conservative tester.
...
llvm-svn: 74401
2009-06-28 00:21:21 +00:00
Andreas Bolka
8976d3bc7e
LDA analysis output scaffolding.
...
llvm-svn: 74400
2009-06-28 00:16:08 +00:00
Dan Gohman
317f054531
Don't try to split a loop when the controlling icmp instruction
...
doesn't have an IV-based operand. This fixes PR4471.
llvm-svn: 74399
2009-06-27 22:58:27 +00:00
Dan Gohman
ffdcba3dbd
Remove the block from the LoopInfo, rather than just the Loop.
...
LoopInfo will handle removing it from the Loop, as well as updating
its own tables.
llvm-svn: 74398
2009-06-27 22:32:36 +00:00
Dan Gohman
c8ca49659a
Teach LoopSimplify how to merge multiple loop exits into a single exit,
...
when one of them can be converted to a trivial icmp and conditional
branch.
This addresses what is essentially a phase ordering problem.
SimplifyCFG knows how to do this transformation, but it doesn't do so
if the primary block has any instructions in it other than an icmp and
a branch. In the given testcase, the block contains other instructions,
however they are loop-invariant and can be hoisted. SimplifyCFG doesn't
have LoopInfo though, so it can't hoist them. And, it's important that
the blocks be merged before LoopRotation, as it doesn't support
multiple-exit loops.
llvm-svn: 74396
2009-06-27 21:30:38 +00:00
Dan Gohman
8918b481bf
More minor code simplifications.
...
llvm-svn: 74395
2009-06-27 21:23:40 +00:00
Dan Gohman
4f16a2923c
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
...
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Dan Gohman
c5c85c0fec
Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
...
of a team of individual allocations and a team of std::maps.
llvm-svn: 74393
2009-06-27 21:21:31 +00:00
Dan Gohman
7ed0bb3b7c
Remove a redundant #include.
...
llvm-svn: 74392
2009-06-27 21:18:51 +00:00
Dan Gohman
830fd38d9b
Change SCEVExpander to use an IRBuilder to emit instructions.
...
llvm-svn: 74391
2009-06-27 21:18:18 +00:00
Dan Gohman
3a4be9df4a
Add a 'const' in a comment.
...
llvm-svn: 74389
2009-06-27 20:53:16 +00:00
Anton Korobeynikov
0f2158b35f
Simplify a bit
...
llvm-svn: 74385
2009-06-27 12:59:03 +00:00
Anton Korobeynikov
a1b5b18bd0
ARM refactoring. Step 2: split RegisterInfo
...
llvm-svn: 74384
2009-06-27 12:16:40 +00:00
Douglas Gregor
33400e3670
Add ThumbInstrInfo.cpp to the CMake makefiles
...
llvm-svn: 74382
2009-06-27 07:44:59 +00:00
Chris Lattner
1ec3afdc66
remove a bunch of fixmes (old checking code) and commonize all the
...
target-specific operand printing functionality. Yay.
llvm-svn: 74379
2009-06-27 05:46:24 +00:00
Chris Lattner
ae0acfcef0
pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
...
llvm-svn: 74378
2009-06-27 05:39:56 +00:00
Chris Lattner
cce1589e4e
simplify some code and eliminate the symbolicAddressesAreRIPRel() predicate.
...
llvm-svn: 74377
2009-06-27 05:24:12 +00:00
Dan Gohman
fe174b6952
When a value is used multiple times within a single PHI, instructions
...
inserted to replace that value must dominate all of of the basic
blocks associated with the uses of the value in the PHI, not just
one of them.
llvm-svn: 74376
2009-06-27 05:16:57 +00:00
Chris Lattner
d17366ae72
fix clang/test/CodeGenObjC/try.m, a basereg doesn't mean no global anymore.
...
llvm-svn: 74375
2009-06-27 04:50:14 +00:00
Chris Lattner
014e83d40d
fix a bunch of failures in the X86-64 JIT by tolerating RIP as
...
a base register. We just ignore it for now.
llvm-svn: 74374
2009-06-27 04:46:33 +00:00
Chris Lattner
9876bd8257
factor some logic out into a helper function, allow remat of loads from constant
...
globals. This implements remat-constant.ll even without aggressive-remat.
llvm-svn: 74373
2009-06-27 04:38:55 +00:00
Chris Lattner
fea81da433
Reimplement rip-relative addressing in the X86-64 backend. The new
...
implementation primarily differs from the former in that the asmprinter
doesn't make a zillion decisions about whether or not something will be
RIP relative or not. Instead, those decisions are made by isel lowering
and propagated through to the asm printer. To achieve this, we:
1. Represent RIP relative addresses by setting the base of the X86 addr
mode to X86::RIP.
2. When ISel Lowering decides that it is safe to use RIP, it lowers to
X86ISD::WrapperRIP. When it is unsafe to use RIP, it lowers to
X86ISD::Wrapper as before.
3. This removes isRIPRel from X86ISelAddressMode, representing it with
a basereg of RIP instead.
4. The addressing mode matching logic in isel is greatly simplified.
5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
passed through various printoperand routines is gone now.
6. The various symbol printing routines in asmprinter now no longer infer
when to emit (%rip), they just print the symbol.
I think this is a big improvement over the previous situation. It does have
two small caveats though: 1. I implemented a horrible "no-rip" modifier for
the inline asm "P" constraint modifier. This is a short term hack, there is
a much better, but more involved, solution. 2. I had to xfail an
-aggressive-remat testcase because it isn't handling the use of RIP in the
constant-pool reading instruction. This specific test is easy to fix without
-aggressive-remat, which I intend to do next.
llvm-svn: 74372
2009-06-27 04:16:01 +00:00
Chris Lattner
df92e147c9
remove some unneeded eh info.
...
llvm-svn: 74371
2009-06-27 04:07:31 +00:00
Chris Lattner
c91e8c7464
When doing remat, don't consider uses of non-allocatable physregs. Patch
...
by Evan.
llvm-svn: 74370
2009-06-27 04:06:41 +00:00
Evan Cheng
eab9ca7ea6
Renaming for consistency.
...
llvm-svn: 74368
2009-06-27 02:26:13 +00:00
Chris Lattner
de36afc1fe
testcase for PR4466
...
llvm-svn: 74367
2009-06-27 01:33:35 +00:00
Chris Lattner
a3260c0b1b
Fix PR4466 by making fastisel set operand flags correctly.
...
llvm-svn: 74366
2009-06-27 01:31:51 +00:00
Chris Lattner
a4775f2b13
fix a typo that GCC should have caught that causes crashes with -view-*-dags
...
llvm-svn: 74364
2009-06-27 00:57:02 +00:00
David Goodwin
5d8b6eef5a
Remove outdated comment.
...
llvm-svn: 74357
2009-06-26 23:39:02 +00:00
David Goodwin
5285817490
When possible, use "mvn ra, rb" instead of "eor ra, rb, -1" because mvn has a narrow version and eor(i) does not.
...
llvm-svn: 74355
2009-06-26 23:13:13 +00:00
Dan Gohman
d3b930d426
Add some testcases for some of the recent ScalarEvolution bug fixes.
...
llvm-svn: 74353
2009-06-26 22:54:11 +00:00
Dan Gohman
daafbe6168
Incorporate the insertion point into the key of SCEVExpander's CSE map.
...
This helps it avoid reusing an instruction that doesn't dominate all
of the users, in cases where the original instruction was inserted
before all of the users were known. This may result in redundant
expansions of sub-expressions that depend on loop-unpredictable values
in some cases, however this isn't very common, and it primarily impacts
IndVarSimplify, so GVN can be expected to clean these up.
This eliminates the need for IndVarSimplify's FixUsesBeforeDefs,
which fixes several bugs.
llvm-svn: 74352
2009-06-26 22:53:46 +00:00
Devang Patel
0f2eb5b9f7
Remove unused routines.
...
llvm-svn: 74351
2009-06-26 22:53:22 +00:00
David Greene
8f6f72cc99
Add feature flags for AVX and FMA and fix some SSE4A feature flag
...
initialization problems.
llvm-svn: 74350
2009-06-26 22:46:54 +00:00
David Goodwin
3aaa751712
Thumb-2 tests
...
llvm-svn: 74345
2009-06-26 22:37:07 +00:00
Dan Gohman
cc030b7e51
Fix ScalarEvolution::getAddRecExpr's code which canonicalized the
...
nesting order of nested AddRec expressions to skip the transformation
if it would introduce an AddRec with operands not loop-invariant
with respect to its loop.
llvm-svn: 74343
2009-06-26 22:36:20 +00:00
Daniel Dunbar
2d83134ca6
NewNightlyTest.pl: Support -submit-aux with -no-submit (run that aux script,
...
instead of skipping).
llvm-svn: 74341
2009-06-26 22:33:28 +00:00
Bob Wilson
ab5354747e
Add missing argument for vtbx intrinsic.
...
llvm-svn: 74340
2009-06-26 22:27:22 +00:00
Dan Gohman
06a4e273be
Fix SCEVAddRecExpr::isLoopInvariant to test if all of its operands
...
are loop invariant, not just the start operand.
llvm-svn: 74338
2009-06-26 22:17:21 +00:00
Chris Lattner
b5c2639f83
remove unwind info, add test for asmprinting of jump table labels with (%rip)
...
llvm-svn: 74337
2009-06-26 22:16:49 +00:00
Evan Cheng
07b016856d
Add x86 support for 'n' inline asm modifier. This will be handled target independently as part of MC work.
...
llvm-svn: 74336
2009-06-26 22:00:19 +00:00
Chris Lattner
3ef702e974
simplify printing of MO_ExternalSymbol in a non-pcrel context.
...
llvm-svn: 74334
2009-06-26 21:47:27 +00:00
Bob Wilson
aa5b92a8c8
Add intrinsics for ARM NEON vtbl and vtbx operations.
...
llvm-svn: 74333
2009-06-26 21:45:05 +00:00
Owen Anderson
c043d13aeb
Privatize some data.
...
llvm-svn: 74332
2009-06-26 21:45:04 +00:00
Owen Anderson
01ad6605c0
Constify this value.
...
llvm-svn: 74330
2009-06-26 21:39:56 +00:00
Anton Korobeynikov
99152f3a2c
Split thumb-related stuff into separate classes.
...
Step 1: ARMInstructionInfo => {ARM,Thumb}InstructionInfo
llvm-svn: 74329
2009-06-26 21:28:53 +00:00
Chris Lattner
40bc649ce9
add %rip to the GR64 register class. Lets avoid allocating it to anything though! :)
...
llvm-svn: 74328
2009-06-26 21:25:00 +00:00
Chris Lattner
49ed726e46
Move all the TLS processing logic into isel, don't do it in asmprinter at all.
...
llvm-svn: 74327
2009-06-26 21:20:29 +00:00
Chris Lattner
899abc4655
make sure to propagate operand flags in SelectTLSADDRAddr properly.
...
llvm-svn: 74326
2009-06-26 21:18:37 +00:00
Chris Lattner
bc60c14c97
fix a really subtle bug in the cross section of aliases and TLS:
...
the SelectionDAG::getGlobalAddress function properly looks through
aliases to determine thread-localness, but then passes the GV* down
to GlobalAddressSDNode::GlobalAddressSDNode which does not. Instead
of passing down isTarget, just pass down the predetermined node
opcode. This fixes some assertions with out of tree changes I'm
working on.
llvm-svn: 74325
2009-06-26 21:14:05 +00:00
David Goodwin
aa294c5593
Thumb-2 has CLZ.
...
llvm-svn: 74322
2009-06-26 20:47:43 +00:00
David Goodwin
35ee722d42
Use "adcs/sbcs" only when the carry-out is live, otherwise use "adc/sbc".
...
llvm-svn: 74321
2009-06-26 20:45:56 +00:00
Jeffrey Yasskin
a363fffe27
Delete LoopPass::runOnFunctionBody. It was never used or implemented.
...
llvm-svn: 74320
2009-06-26 20:42:50 +00:00
Owen Anderson
4c472e1cfa
Get rid of these cache variables, which are a holdover from the days when
...
we had multiple type planes and these lookups were expensive.
llvm-svn: 74319
2009-06-26 20:33:47 +00:00
Owen Anderson
f92b432385
Make this const.
...
llvm-svn: 74317
2009-06-26 20:21:18 +00:00
Chris Lattner
76b3c06793
minor cleanup/framework changes.
...
llvm-svn: 74316
2009-06-26 20:00:05 +00:00
Owen Anderson
304d85be8c
Privatize some variables.
...
llvm-svn: 74315
2009-06-26 19:48:37 +00:00
Chris Lattner
2ed6a9d7bd
move magic for PIC constantpool references from asmprinter to isel.
...
llvm-svn: 74313
2009-06-26 19:22:52 +00:00
Chris Lattner
7f82a19fbf
implement DOTGraphTraits<SelectionDAG*>::getNodeLabel in terms of
...
SDNode::print_details to eliminate a ton of near-duplicate code.
llvm-svn: 74311
2009-06-26 19:06:10 +00:00
Chris Lattner
08d734448e
use jump table operand flags in asm printer instead of "magic predicates"
...
llvm-svn: 74310
2009-06-26 18:55:01 +00:00
Daniel Dunbar
a720af1370
More spelling Count as count.
...
llvm-svn: 74306
2009-06-26 18:35:07 +00:00
Bob Wilson
88efd1fed3
Swap order of arguments to vst[34]* intrinsics. This matches the order
...
used by both the user-visible intrinsics defined by ARM and the
corresponding GCC builtins.
llvm-svn: 74300
2009-06-26 18:23:29 +00:00
Daniel Dunbar
6b1678d5d8
Spell Count as count.
...
llvm-svn: 74298
2009-06-26 18:21:54 +00:00
David Goodwin
3bd42afebe
Add Thumb-2 tests.
...
llvm-svn: 74295
2009-06-26 18:10:30 +00:00
Owen Anderson
4a03279231
Use atomic operations for accessing this global counter.
...
llvm-svn: 74294
2009-06-26 18:09:03 +00:00
David Goodwin
5960e6d974
ADC used to implement adde should use "adcs" opcode instead of "adc".
...
llvm-svn: 74293
2009-06-26 18:07:25 +00:00
Owen Anderson
455df54003
Get rid of unnecessary global variables.
...
llvm-svn: 74291
2009-06-26 16:46:15 +00:00
David Goodwin
34f7ede9e7
ORN and BIC tests.
...
llvm-svn: 74289
2009-06-26 16:20:06 +00:00
David Goodwin
0377f737ff
Currently there is a pattern for the thumb-2 MOV 16-bit immediate instruction. That instruction cannot write the flags so it should use T2I instead of T2sI.
...
Also, added a pattern for the thumb-2 MOV of shifted immediate since that can encode immediates not encodable by the 16-bit immediate.
llvm-svn: 74288
2009-06-26 16:10:07 +00:00
Douglas Gregor
6d94e6a5f3
Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
...
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Douglas Gregor
1d88779e2f
CMake: add configure checks for pthread_rwlock_init and pthread_getspecific
...
llvm-svn: 74284
2009-06-26 14:35:43 +00:00
Owen Anderson
331c8ab96f
Fix compilation without pthreads.
...
Patch by Xerxes Ranby.
llvm-svn: 74283
2009-06-26 08:48:03 +00:00
Evan Cheng
7779156b39
Fix tests: Count -> count.
...
llvm-svn: 74282
2009-06-26 07:05:57 +00:00
Evan Cheng
d6460965a5
Indentation.
...
llvm-svn: 74281
2009-06-26 06:57:16 +00:00
Evan Cheng
1eda63715f
Simplify predicate CarryDefIsUsed.
...
llvm-svn: 74277
2009-06-26 06:10:18 +00:00
Evan Cheng
34c8c7414f
Fix a CodeGenDAGPatterns bug. Check if top level predicates match when it's looking for duplicates.
...
llvm-svn: 74276
2009-06-26 05:59:16 +00:00
Chris Lattner
1d3b65a6ae
fix a pasto.
...
llvm-svn: 74275
2009-06-26 05:56:49 +00:00
Chris Lattner
68bb4e0e01
dot graph viewing is apparently not using SDNode::print_details, this is bad,
...
but in the meantime lets print targetflags on node labels.
llvm-svn: 74274
2009-06-26 05:55:43 +00:00
Chris Lattner
17dcba9da4
propagate target operand flags from dag nodes into MachineOperands.
...
llvm-svn: 74273
2009-06-26 05:52:14 +00:00
Chris Lattner
bd7e26db16
propagate target operand flags through addressing mode selection.
...
llvm-svn: 74272
2009-06-26 05:51:45 +00:00
Shantonu Sen
89d5c4196e
Clarify how to configure llvm-gcc-4.2 for use with
...
test suite. Remove documentation for --with-f2c, which
is no longer supported. Remove information about obtaining
tcl/expect, which ship with Mac OS X by default since
10.4.
llvm-svn: 74271
2009-06-26 05:44:53 +00:00
Chris Lattner
54b8ebced6
fit in 80 cols
...
llvm-svn: 74270
2009-06-26 05:39:02 +00:00
Nick Lewycky
2dbc6476cb
Escape the name of the module since it comes from the file name and may include
...
invalid characters like backslashes on Windows. Patch by James Abbatiello!
llvm-svn: 74265
2009-06-26 04:33:37 +00:00
Daniel Dunbar
b44c26b7aa
NewNightlyTest: Pull most VERBOSE handling into RunLoggedCommand function.
...
llvm-svn: 74256
2009-06-26 02:30:49 +00:00
Devang Patel
2cc6d183b2
Let's ignore MDStrings also!
...
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Devang Patel
62d414f327
Remove unnecessary includes.
...
llvm-svn: 74254
2009-06-26 02:25:46 +00:00
Daniel Dunbar
e7d42501c2
Fix may-be-used-uninitialized warning.
...
llvm-svn: 74253
2009-06-26 02:03:52 +00:00
Daniel Dunbar
2d3d1cd91a
NewNightlyTest: Factor out LLVM{Src,Obj,Test} variables.
...
- They can be overriden on the command line as well.
Add -teelogs option, which will also print the various logs on stdout.
llvm-svn: 74252
2009-06-26 01:53:05 +00:00
Devang Patel
0751a28888
Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
...
and llvm.dbg.global_variables.
llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Daniel Dunbar
aa311ca000
Fix unused variable warnings.
...
llvm-svn: 74250
2009-06-26 01:34:35 +00:00
Daniel Dunbar
07025e2c02
Fix spelling of 'count'
...
llvm-svn: 74249
2009-06-26 01:33:02 +00:00
Owen Anderson
276fc52b72
Fix error in the Win32 implementation pointed out by Howard Su.
...
llvm-svn: 74248
2009-06-26 00:51:20 +00:00
Chris Lattner
2aaad91bbe
start adding logic in isel to determine asm printer semantics, step N of M.
...
llvm-svn: 74246
2009-06-26 00:43:52 +00:00
Dan Gohman
ac3b5382b8
Change this code to a form about which VC++ reportedly isn't unhappy.
...
llvm-svn: 74243
2009-06-26 00:35:12 +00:00
Dan Gohman
7eaf50ecac
Fix LCSSA to avoid emitting a PHI node for the unwind destination of
...
an invoke instruction, since the value isn't really live across that
edge.
llvm-svn: 74242
2009-06-26 00:31:13 +00:00
Evan Cheng
e2c4d35f3e
Add a note about commuting conditional move.
...
llvm-svn: 74241
2009-06-26 00:28:48 +00:00
Dan Gohman
31167c61d5
Minor code simplification.
...
llvm-svn: 74240
2009-06-26 00:26:03 +00:00
Evan Cheng
cf661fc12a
These are done / no longer applicable.
...
llvm-svn: 74239
2009-06-26 00:25:27 +00:00
Evan Cheng
5bf9011c2d
Mark a bunch of instructions commutable.
...
llvm-svn: 74237
2009-06-26 00:19:44 +00:00
Evan Cheng
9643ba8123
tst is also commutable.
...
llvm-svn: 74236
2009-06-26 00:19:07 +00:00
Owen Anderson
b99db00b64
Committed the wrong version in my last commit.
...
llvm-svn: 74235
2009-06-26 00:17:05 +00:00
Owen Anderson
1efcb40c0f
Privatize a static variable.
...
llvm-svn: 74234
2009-06-26 00:15:27 +00:00