Anton Korobeynikov
09f51d1fd4
Factor out offset printing code into generic AsmPrinter.
...
FIXME: it seems, that most of targets don't support
offsets wrt CPI/GlobalAddress', was it intentional?
llvm-svn: 58917
2008-11-08 17:21:38 +00:00
Nicolas Geoffray
5a48f232f7
The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.
...
llvm-svn: 58908
2008-11-08 15:36:01 +00:00
Anton Korobeynikov
09991ada2d
StoreInst does not produce any result thus it's useless to create new
...
variable for it. This greatly reduces amount of unused variables in
llvm2cpp-generated code
llvm-svn: 58905
2008-11-08 12:58:07 +00:00
Anton Korobeynikov
9278247502
Properly escape dashes in TableGen's LLVMC2 emitter.
...
Patch by Patrick Walton!
llvm-svn: 58901
2008-11-08 10:16:21 +00:00
Eric Christopher
6e670388c0
Fix syntax of iterate_complex example. Noticed by Martin!
...
llvm-svn: 58900
2008-11-08 08:20:49 +00:00
Evan Cheng
436bdcdcca
Moved InvalidateInstructionCache to ARMJITInfo::emitFunctionStub which knows size of stub.
...
llvm-svn: 58899
2008-11-08 08:16:49 +00:00
Evan Cheng
686a725b45
Remove a InvalidateInstructionCache call with incorrect size.
...
llvm-svn: 58898
2008-11-08 08:15:39 +00:00
Evan Cheng
b31a717527
Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
...
llvm-svn: 58897
2008-11-08 08:02:53 +00:00
Evan Cheng
98161f5f34
Tell ARMJITInfo if codegen relocation is PIC. It changes how function stubs are generated.
...
llvm-svn: 58896
2008-11-08 07:38:22 +00:00
Evan Cheng
1b889b16da
Rename isString -> isExternalSymbol; getString -> getExternalSymbol since these work on externsym machine relocations.
...
llvm-svn: 58895
2008-11-08 07:37:34 +00:00
Evan Cheng
776f5922fb
More debug output.
...
llvm-svn: 58894
2008-11-08 07:22:53 +00:00
Evan Cheng
bb373c4637
Fix relocation for calls to external symbols.
...
llvm-svn: 58893
2008-11-08 07:22:33 +00:00
Scott Michel
1ccbbc3d07
CellSPU: Fix prologue/epilogue emission when function contains calls but
...
theframe size is 0; the prologue and epilogue should be emitted in this case.
llvm-svn: 58890
2008-11-08 05:16:20 +00:00
Daniel Dunbar
2b9dce2669
Rework r58829, allowing removal of dbg info intrinsics during alloca
...
promotion.
- Eliminate uses after free and simplify tests.
Devang: Please check that this is still doing what you intended.
llvm-svn: 58887
2008-11-08 04:12:17 +00:00
Daniel Dunbar
06ad209fb1
Add LLVMC2 tool definitions for Objective-C and Objective-C++.
...
llvm-svn: 58885
2008-11-08 03:25:47 +00:00
Evan Cheng
077c8f8832
Skip over two-address use operands.
...
llvm-svn: 58883
2008-11-08 01:44:13 +00:00
Evan Cheng
ffdd91e3b8
Handle ARM machine constantpool entry with non-lazy ptr.
...
llvm-svn: 58882
2008-11-08 01:31:27 +00:00
Evan Cheng
b126422533
Indentation.
...
llvm-svn: 58881
2008-11-08 01:30:20 +00:00
Ted Kremenek
865da3cae0
remove unavailable clang project
...
llvm-svn: 58879
2008-11-08 01:02:44 +00:00
Evan Cheng
454ff53d58
Use ARMFunctionInfo to track number of constpool entries and jumptables.
...
llvm-svn: 58877
2008-11-08 00:51:41 +00:00
Dale Johannesen
d70bd61758
Generated code for generic expansion of SETUGT etc.
...
is noticeably worse than previous PPC-specific code.
Since the latter was also wrong in some cases and
correctness is more important than efficiency, I'm
disabling this test temporarily while I fix it.
llvm-svn: 58876
2008-11-08 00:49:19 +00:00
Dale Johannesen
ee04c24bd5
Xfail an incorrect test.
...
llvm-svn: 58875
2008-11-08 00:40:24 +00:00
Dale Johannesen
bb5c9b4b68
Make testb optimization work on big-endian targets.
...
llvm-svn: 58874
2008-11-08 00:01:16 +00:00
Evan Cheng
ef4d78ba67
More code clean up.
...
llvm-svn: 58872
2008-11-07 22:57:53 +00:00
Dale Johannesen
160be0ffda
Make FP tests requiring two compares work on PPC (PR 642).
...
This is Chris' patch from the PR, modified to realize that
SETUGT/SETULT occur legitimately with integers, plus
two fixes in LegalizeDAG to pass a valid result type into
LegalizeSetCC. The argument of TLI.getSetCCResultType is
ignored on PPC, but I think I'm following usage elsewhere.
llvm-svn: 58871
2008-11-07 22:54:33 +00:00
Evan Cheng
8467e2459a
Get PIC jump table working.
...
llvm-svn: 58869
2008-11-07 22:30:53 +00:00
Evan Cheng
077f686d4b
More debug output.
...
llvm-svn: 58868
2008-11-07 22:30:29 +00:00
Dan Gohman
cc0d2cfa01
Make tablegen print out a nice error message for a const char*
...
exception, like it does for a std::string exception.
llvm-svn: 58865
2008-11-07 21:01:13 +00:00
Dan Gohman
67feab3b5a
Document the acronym RAUW. Patch by Jonathan Brandmeyer!
...
llvm-svn: 58863
2008-11-07 20:29:17 +00:00
Duncan Sands
2d636b5265
Sign-extend rather than zero-extend when promoting
...
the condition for a BRCOND, according to what is
returned by getSetCCResultContents. Since all
targets return the same thing (ZeroOrOneSetCCResult),
this should be harmless! The point is that all over
the place the result of SETCC is fed directly into
BRCOND. On machines for which getSetCCResultContents
returns ZeroOrNegativeOneSetCCResult, this is a
sign-extended boolean. So it seems dangerous to
also feed BRCOND zero-extended booleans in some
circumstances - for example, when promoting the
condition.
llvm-svn: 58861
2008-11-07 20:13:04 +00:00
Dan Gohman
cb0df597e0
Flush the raw_ostream after emitting the assembly for a function.
...
This is a temporary fix for the -print-emitted-asm option, where
errs() is used as the stream, in the case where other code is
using stderr without using errs()' buffer. Hopefully soon we'll
fix errs() to be non-buffered instead. Patch by Preston Gurd.
llvm-svn: 58859
2008-11-07 19:49:17 +00:00
Dale Johannesen
9016882d67
Fix unsigned->ppcf128 conversion.
...
llvm-svn: 58856
2008-11-07 19:11:43 +00:00
Nick Lewycky
3707f1e6f3
Update to add newer bitcodes.
...
llvm-svn: 58852
2008-11-07 14:52:51 +00:00
Richard Osborne
75edafc672
Keep CREDITS.TXT sorted by name.
...
llvm-svn: 58845
2008-11-07 12:44:36 +00:00
Richard Osborne
5923f60099
Add contributer information for XCore backend to CREDITS.TXT
...
llvm-svn: 58844
2008-11-07 12:41:14 +00:00
Richard Osborne
7b2eae9bdd
Add XCore backend to CMake build.
...
llvm-svn: 58843
2008-11-07 12:37:45 +00:00
Richard Osborne
86d68a492a
Add basic test for XCore backend
...
llvm-svn: 58841
2008-11-07 11:24:12 +00:00
Richard Osborne
3219819ffe
Fix compile warnings.
...
llvm-svn: 58840
2008-11-07 11:21:09 +00:00
Scott Michel
3395d4485d
CellSPU: Ensure that C strings are always put in the .rodata section
...
llvm-svn: 58839
2008-11-07 11:06:44 +00:00
Richard Osborne
ca08e0645a
Add XCore backend.
...
llvm-svn: 58838
2008-11-07 10:59:00 +00:00
Evan Cheng
7095cd2af2
Jump table JIT support. Work in progress.
...
llvm-svn: 58836
2008-11-07 09:06:08 +00:00
Evan Cheng
00203155ad
Jump tables may be emitted by target.
...
llvm-svn: 58835
2008-11-07 09:02:17 +00:00
Evan Cheng
a2d1605ac3
Jump table relocation addresses may be resolved by target.
...
llvm-svn: 58834
2008-11-07 09:01:15 +00:00
Scott Michel
34d93f8572
Teach CellSPU about ELF sections and new section emitter classes.
...
NB: This is likely to need more work.
llvm-svn: 58832
2008-11-07 04:36:25 +00:00
Bill Wendling
b9656df4ac
BCUI + 1 doesn't work. Use next instead.
...
llvm-svn: 58830
2008-11-07 01:59:41 +00:00
Bill Wendling
1af23b035f
Refactor code that adjusts the offsets of stack objects.
...
llvm-svn: 58829
2008-11-07 01:48:58 +00:00
Evan Cheng
98dc53e926
Encode misc arithmetic instructions.
...
llvm-svn: 58828
2008-11-07 01:41:35 +00:00
Dale Johannesen
a129e0b826
Testcase for testb optimization.
...
llvm-svn: 58827
2008-11-07 01:30:18 +00:00
Devang Patel
b8e0d59ceb
Handle (delete) dbg intrinsics while promoting alloca.
...
llvm-svn: 58826
2008-11-07 01:30:07 +00:00
Dale Johannesen
7aad542d35
When we're doing a compare of load-AND-constant to 0
...
(e.g. a bitfield test) narrow the load as much as possible.
The has the potential to avoid unnecessary partial-word
load-after-store conflicts, which cause stalls on several targets.
Also a size win on x86 (testb vs testl).
llvm-svn: 58825
2008-11-07 01:28:02 +00:00
Bill Wendling
eb4268d72f
- Modify the stack protector algorithm so that the stack slot is allocated in
...
LLVM IR code and not in the selection DAG ISel. This is a cleaner solution.
- Fix the heuristic for determining if protectors are necessary. The previous
one wasn't checking the proper type size.
llvm-svn: 58824
2008-11-07 01:23:58 +00:00
Bill Wendling
87d0746e71
Remove unneeded header file.
...
llvm-svn: 58823
2008-11-06 23:56:59 +00:00
Bill Wendling
a0826e1855
Don't build a vector of returns. Just modify the Function in the loop.
...
llvm-svn: 58822
2008-11-06 23:55:49 +00:00
Mon P Wang
5ca2ec65bd
Fixed scalarizing an extract subvector and prevent an infinite loop
...
when simplify a vector.
llvm-svn: 58820
2008-11-06 22:52:21 +00:00
Bill Wendling
d939a7b305
The size limit is for individual arrays. So if any array has more than 8 bytes
...
in it, then emit stack protectors.
llvm-svn: 58819
2008-11-06 22:18:44 +00:00
Evan Cheng
49d665218c
Encode extend instructions; more clean up.
...
llvm-svn: 58818
2008-11-06 22:15:19 +00:00
Dan Gohman
193e4c025e
Fix a use of an invalid iterator when -debug-pass=Details is used.
...
llvm-svn: 58816
2008-11-06 21:57:17 +00:00
Bill Wendling
8b47c1e0a2
Don't recalculate the stack position of the stack protector.
...
llvm-svn: 58815
2008-11-06 21:37:09 +00:00
Devang Patel
8af0a362f1
Emit label for llvm.dbg.func.start of the inlined function.
...
llvm-svn: 58814
2008-11-06 21:28:20 +00:00
Devang Patel
ef21de946b
Clarify documentation. A module pass MP can require a function paqss FP only if FP does not require any module pass.
...
llvm-svn: 58813
2008-11-06 19:47:49 +00:00
Evan Cheng
aa03cd3336
- Improve naming consistency: Branch -> BrFrm, BranchMisc -> BrMiscFrm.
...
- Consolidate instruction formats.
- Other clean up.
llvm-svn: 58808
2008-11-06 17:48:05 +00:00
Evan Cheng
972fd1a1e0
Improve JIT debugging outputs format consistency.
...
llvm-svn: 58807
2008-11-06 17:46:04 +00:00
Nuno Lopes
2817338558
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
...
llvm-svn: 58805
2008-11-06 16:21:49 +00:00
Duncan Sands
f178f8300d
Formating/comment changes - no functionality change.
...
llvm-svn: 58801
2008-11-06 08:51:32 +00:00
Evan Cheng
47b546d75f
Remove opcode from instruction TS flags; add MOVCC support; fix addrmode3 encoding bug.
...
llvm-svn: 58800
2008-11-06 08:47:38 +00:00
Bill Wendling
b3f7a39877
- Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.
...
- Get rid of "HasStackProtector" in MachineFrameInfo.
- Modify intrinsics to tell which are doing what with memory.
llvm-svn: 58799
2008-11-06 07:23:03 +00:00
Steve Naroff
ef625263ef
Update VC++ projects.
...
llvm-svn: 58798
2008-11-06 06:24:59 +00:00
Mon P Wang
9a8d60a7c0
Widening cleanup
...
llvm-svn: 58796
2008-11-06 05:31:54 +00:00
Evan Cheng
36ae40342f
Handle smul<x><y>, smulw<y>, smla<x><y>, smlaw<y>.
...
llvm-svn: 58793
2008-11-06 03:35:07 +00:00
Bill Wendling
43de293d75
Adjust the stack protector heuristic to care about only arrays or calls to
...
"alloca".
llvm-svn: 58792
2008-11-06 02:38:58 +00:00
Bill Wendling
d970ea3eac
Implement the stack protector stack accesses via intrinsics:
...
- stackprotector_prologue creates a stack object and stores the guard there.
- stackprotector_epilogue reads the stack guard from the stack position created
by stackprotector_prologue.
- The PrologEpilogInserter was changed to make sure that the stack guard is
first on the stack frame.
llvm-svn: 58791
2008-11-06 02:29:10 +00:00
Evan Cheng
b870fd8874
Fix so_imm encoding bug; add support for MOVi2pieces.
...
llvm-svn: 58790
2008-11-06 02:25:39 +00:00
Evan Cheng
2686c8fb34
Fix encoding of multiple instructions with 3 src operands; also handle smmul, smmla, and smmls.
...
llvm-svn: 58789
2008-11-06 01:21:28 +00:00
Evan Cheng
3aeeb3a47c
Need a \n.
...
llvm-svn: 58788
2008-11-06 01:18:29 +00:00
Devang Patel
5a5ab730e0
InstructionNamer preserves everything.
...
llvm-svn: 58787
2008-11-06 01:00:16 +00:00
Devang Patel
9e3e776e28
Emit label for llvm.dbg.func.start of the inlined function.
...
llvm-svn: 58786
2008-11-06 00:30:09 +00:00
Steve Naroff
0b0c99610c
Add post-build event for clangDriver (to copy clang.exe into "dstroot").
...
llvm-svn: 58783
2008-11-06 00:11:31 +00:00
Evan Cheng
d1c5c7f499
Undo 58778 but makes the binary dump prettier.
...
llvm-svn: 58782
2008-11-05 23:44:08 +00:00
Bill Wendling
f5f6f74c16
Add comments to function.
...
llvm-svn: 58781
2008-11-05 23:42:27 +00:00
Evan Cheng
fd2adbfa28
Encode pic load / store instructions; fix some encoding bugs.
...
llvm-svn: 58780
2008-11-05 23:22:34 +00:00
Evan Cheng
6158254d1d
Add command line option -entry-funcion to override entry function (default is main).
...
llvm-svn: 58779
2008-11-05 23:21:52 +00:00
Evan Cheng
51b9b9f6e2
Remove debug output that's not really useful.
...
llvm-svn: 58778
2008-11-05 23:21:11 +00:00
Dan Gohman
3777ed765f
Make ISel ignore dead nodes. The DAGCombiner normally eliminates
...
dead nodes, but in this case its missing one. Fixing the DAGCombiner
is desirable, but it's somewhat involved.
llvm-svn: 58777
2008-11-05 22:56:47 +00:00
Andrew Lenharth
912e7131a4
opt was not exporting the Mangler symbols
...
llvm-svn: 58775
2008-11-05 22:42:50 +00:00
Devang Patel
f53d7ff870
Add PR number.
...
llvm-svn: 58765
2008-11-05 18:41:15 +00:00
Evan Cheng
81889d010c
Restructure ARM code emitter to use instruction formats instead of addressing modes to determine how to encode instructions.
...
llvm-svn: 58764
2008-11-05 18:35:52 +00:00
Dan Gohman
ce2417f4e1
Use an assert to check that SelectCode isn't called on
...
nodes that are already selected.
llvm-svn: 58763
2008-11-05 18:30:52 +00:00
Dan Gohman
87002dbea1
The HadDelete field is no longer used.
...
llvm-svn: 58761
2008-11-05 17:35:14 +00:00
Dan Gohman
7a638a8c7e
Reintroduce a comment that was removed with the AddToISelQueue
...
changes.
llvm-svn: 58760
2008-11-05 17:16:24 +00:00
Dan Gohman
22079067e1
Update some comments to reflect the new code.
...
llvm-svn: 58759
2008-11-05 17:13:57 +00:00
Richard Osborne
bfd58d87f3
Test commit, add Makefile for XCore target, more to follow.
...
llvm-svn: 58755
2008-11-05 09:53:58 +00:00
Duncan Sands
68035d4076
Fix thinko in ppcf128 expansion of truncating store.
...
llvm-svn: 58753
2008-11-05 07:17:27 +00:00
Evan Cheng
27889ab29f
Add more vector move low and zero-extend patterns.
...
llvm-svn: 58752
2008-11-05 06:04:51 +00:00
Evan Cheng
c7b04a12bb
Type of shuffle mask has changed.
...
llvm-svn: 58751
2008-11-05 06:04:18 +00:00
Evan Cheng
3cd5e8c97b
Indentation.
...
llvm-svn: 58750
2008-11-05 06:03:38 +00:00
Dan Gohman
f14b77ebf1
Eliminate the ISel priority queue, which used the topological order for a
...
priority function. Instead, just iterate over the AllNodes list, which is
already in topological order. This eliminates a fair amount of bookkeeping,
and speeds up the isel phase by about 15% on many testcases.
The impact on most targets is that AddToISelQueue calls can be simply removed.
In the x86 target, there are two additional notable changes.
The rule-bending AND+SHIFT optimization in MatchAddress that creates new
pre-isel nodes during isel is now a little more verbose, but more robust.
Instead of either creating an invalid DAG or creating an invalid topological
sort, as it has historically done, it can now just insert the new nodes into
the node list at a position where they will be consistent with the topological
ordering.
Also, the address-matching code has logic that checked to see if a node was
"already selected". However, when a node is selected, it has all its uses
taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any
further visits from MatchAddress. This code is now removed.
llvm-svn: 58748
2008-11-05 04:14:16 +00:00
Dan Gohman
fd820528ab
Use getTargetConstant instead of getConstant for nodes that should not be visited
...
by isel and potentially forced into registers.
llvm-svn: 58747
2008-11-05 02:06:09 +00:00
Evan Cheng
132de1983f
Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
...
indirect gv reference. Please don't call it lazy.
llvm-svn: 58746
2008-11-05 01:50:32 +00:00
Devang Patel
f04bfc6989
New test case.
...
llvm-svn: 58745
2008-11-05 01:40:30 +00:00
Devang Patel
f0ef35738c
Do now allow InlineAlways pass to remove dead functions.
...
llvm-svn: 58744
2008-11-05 01:39:16 +00:00
Devang Patel
e94321305f
Silence unused variable warnings.
...
llvm-svn: 58743
2008-11-05 01:37:40 +00:00
Devang Patel
7a848b0ee3
Check Attribute::NoInline.
...
llvm-svn: 58742
2008-11-05 01:37:05 +00:00
Bill Wendling
db045a3048
Remove dead variable.
...
llvm-svn: 58741
2008-11-05 00:56:35 +00:00
Bill Wendling
f1b4e2626b
Simplify the allocated size calculation.
...
llvm-svn: 58740
2008-11-05 00:54:27 +00:00
Bill Wendling
75e38fedc8
Fix comment
...
llvm-svn: 58739
2008-11-05 00:46:15 +00:00
Owen Anderson
26c10f1b4a
Use the new predicate to control when we do prealloc splitting. Fix a small bug.
...
llvm-svn: 58738
2008-11-05 00:32:13 +00:00
Evan Cheng
33ba5e78d2
Debugging output tweak.
...
llvm-svn: 58737
2008-11-05 00:22:28 +00:00
Oscar Fuentes
076e048cf7
CMake: updated list of source files.
...
llvm-svn: 58736
2008-11-05 00:11:22 +00:00
Bill Wendling
782e8346a5
Some code simplification. It now doesn't generate a prologue if the epilogue
...
isn't going to be generated.
llvm-svn: 58734
2008-11-05 00:00:21 +00:00
Dan Gohman
8cdea717a3
Add a new pass to simplify specific half_powr function calls. This is
...
a specialized pass that it not likely to be generally useful.
llvm-svn: 58732
2008-11-04 23:41:45 +00:00
Devang Patel
db9d785338
On darwin, 32-bit x86 target is i386-apple-darwin...
...
llvm-svn: 58731
2008-11-04 23:13:50 +00:00
Nuno Lopes
0460bb27e0
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
...
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager
llvm-svn: 58730
2008-11-04 23:03:58 +00:00
Anton Korobeynikov
d6948315b7
Fix tests not to emit IR output
...
llvm-svn: 58729
2008-11-04 23:02:39 +00:00
Bill Wendling
d31fc54f34
Small simplification of the stack guard type.
...
llvm-svn: 58728
2008-11-04 22:54:43 +00:00
Bill Wendling
2f40956c68
- Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
...
"getOrInsertFunction" in that it either adds a new declaration of the global
and returns it, or returns the current one -- optionally casting it to the
correct type.
- Use the new getOrInsertGlobal in the stack protector code.
- Use "splitBasicBlock" in the stack protector code.
llvm-svn: 58727
2008-11-04 22:51:24 +00:00
Owen Anderson
a926ed4b50
First pass at checking for the creation of a new join point when doing pre-alloc splitting. This is not turned on yet.
...
llvm-svn: 58726
2008-11-04 22:22:41 +00:00
Evan Cheng
e3827d9061
Actually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.
...
llvm-svn: 58725
2008-11-04 22:19:55 +00:00
Bill Wendling
64adc71e9a
Update in response to feedback from Chris:
...
- Use enums instead of magic numbers.
- Rework algorithm to use the bytes size from the target to determine when to
emit stack protectors.
- Get rid of "propolice" in any comments.
- Renamed an option to its expanded form.
- Other miscellanenous changes.
More changes will come after this.
llvm-svn: 58723
2008-11-04 21:53:09 +00:00
Gabor Greif
e5f9d67a68
fix two validation errors
...
llvm-svn: 58722
2008-11-04 21:50:59 +00:00
Gabor Greif
6b7bb1f127
fix typos, harmonize formatting
...
llvm-svn: 58721
2008-11-04 21:48:10 +00:00
Tanya Lattner
e842074c48
Revert 58687. This breaks mingw.
...
llvm-svn: 58719
2008-11-04 21:06:11 +00:00
Dale Johannesen
0a7b4f5800
Allow SROA of vectors. Removing this caused a
...
huge performance regression in something we care
about. This may not be final fix.
llvm-svn: 58718
2008-11-04 20:54:03 +00:00
Dale Johannesen
db6b956585
80 columns
...
llvm-svn: 58717
2008-11-04 20:52:49 +00:00
Evan Cheng
297b32a367
Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
...
llvm-svn: 58714
2008-11-04 19:57:48 +00:00
Tanya Lattner
81edfc172e
Add note about cmake. Patch by Oscar Fuentes.
...
llvm-svn: 58712
2008-11-04 18:40:27 +00:00
Dan Gohman
daca2240b1
Give tablegen's Type a destructor, to suppress spurious
...
"Type has virtual functions but non-virtual destructor"
warnings.
llvm-svn: 58710
2008-11-04 18:09:07 +00:00
Duncan Sands
dd571d325e
Fix typo. Patch by nlewycky.
...
llvm-svn: 58709
2008-11-04 18:05:30 +00:00
Evan Cheng
4eaff40147
Debug output tweak.
...
llvm-svn: 58708
2008-11-04 17:58:53 +00:00
Evan Cheng
453844c352
LDM_RET restores pc, do not set 's' bit which would restore CPSR from SPSR.
...
llvm-svn: 58707
2008-11-04 17:57:07 +00:00
Duncan Sands
d5f935921a
Fix PR3011: LegalizeTypes support for scalarizing
...
SELECT_CC.
llvm-svn: 58706
2008-11-04 17:31:08 +00:00
Dan Gohman
20687e99b7
Duncan pointed out that the Extended case in getTypeForMVT could
...
be considerably simplified.
llvm-svn: 58703
2008-11-04 16:19:44 +00:00
Dan Gohman
72d10ab9ad
Add a return statement to suppress warnings in NDEBUG builds.
...
llvm-svn: 58702
2008-11-04 16:08:57 +00:00
Dan Gohman
ade09cd9d3
Add some asserts to verify MVT invariant assumptions.
...
llvm-svn: 58701
2008-11-04 16:03:56 +00:00
Nuno Lopes
c6a5b0979f
regenerate
...
llvm-svn: 58697
2008-11-04 14:43:20 +00:00
Nuno Lopes
0e92081b04
fix leakage of APFloats in getExistingVal()
...
llvm-svn: 58696
2008-11-04 14:42:19 +00:00
Nuno Lopes
e4f5c9495f
regenerate
...
llvm-svn: 58694
2008-11-04 14:28:33 +00:00
Nuno Lopes
724e67ec75
fix leakage of APSInt in getVal()
...
llvm-svn: 58693
2008-11-04 14:26:58 +00:00
Nuno Lopes
57c6594e97
fix leakage of IfcvtTokens
...
llvm-svn: 58690
2008-11-04 13:02:59 +00:00
Evan Cheng
9340be4641
For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.
...
This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.
llvm-svn: 58688
2008-11-04 09:30:48 +00:00
Nick Lewycky
a6dee4e28f
Don't "shell out" to resolve paths. Using pure perl makes llvm-config
...
friendlier to non-Unixes that happen to have perl. Patch from Sascha Othman!
llvm-svn: 58687
2008-11-04 08:05:21 +00:00
Evan Cheng
09053e62a9
80 col violation.
...
llvm-svn: 58684
2008-11-04 06:10:31 +00:00
Evan Cheng
2299c99d79
Stylistic change.
...
llvm-svn: 58683
2008-11-04 06:10:06 +00:00
Evan Cheng
c1d10e6b42
hasDisassembler should return false if disassembler isn't available.
...
llvm-svn: 58682
2008-11-04 06:09:38 +00:00
Oscar Fuentes
a69d8c50dc
CMakeLists: removed asmprinter component from
...
tools/llc/CMakeLists.txt.
llvm-svn: 58678
2008-11-04 03:28:37 +00:00
Oscar Fuentes
7751a7b78d
CMake: Support for building 32 bit mode libs and binaries on
...
Linux/x86-64.
llvm-svn: 58677
2008-11-04 03:27:24 +00:00
Oscar Fuentes
8881a91ae8
CMake: Updated list of source files.
...
llvm-svn: 58676
2008-11-04 03:24:04 +00:00
Bill Wendling
05d8417fa0
Initial checkin for stack protectors. Here's what it does:
...
* The prologue is modified to read the __stack_chk_guard global and insert it
onto the stack.
* The epilogue is modified to read the stored guard from the stack and compare
it to the original __stack_chk_guard value. If they differ, then the
__stack_chk_fail() function is called.
* The stack protector needs to be first on the stack (after the parameters) to
catch any stack-smashing activities.
Front-end support will follow after a round of beta testing.
llvm-svn: 58673
2008-11-04 02:10:20 +00:00
Evan Cheng
6dd08b6604
Handle ARM machine constantpool entries.
...
llvm-svn: 58671
2008-11-04 00:50:32 +00:00
Dan Gohman
b9110e7fbb
The ANDMask node folds to a constant, and isn't the node that needs to
...
have its node id set. The new and and shift nodes are the nodes that need
the IDs. This fixes PR2982.
llvm-svn: 58655
2008-11-03 23:43:55 +00:00
Devang Patel
d26344d252
Fix unused variable warnings.
...
llvm-svn: 58653
2008-11-03 23:20:04 +00:00
Devang Patel
f33f8a8606
Fix unused variable warnings.
...
llvm-svn: 58651
2008-11-03 23:14:09 +00:00
Dan Gohman
d5104a5de6
Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!
...
llvm-svn: 58650
2008-11-03 22:55:43 +00:00
Evan Cheng
f60e5aaaac
Remove a dead switch statement.
...
llvm-svn: 58644
2008-11-03 21:26:52 +00:00
Evan Cheng
3620e685b5
Minor code restructuring. No functionality change.
...
llvm-svn: 58643
2008-11-03 21:02:39 +00:00
Dale Johannesen
08535d2507
Fix some ppcf128 regressions: make ExpandFloatRes_LOAD
...
work correctly, and bring over a late change to ppcf128
SetCC handling.
llvm-svn: 58642
2008-11-03 20:47:45 +00:00
Duncan Sands
6692dec2a0
Make VAARG promotion work correctly with large funky
...
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now. But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.
llvm-svn: 58635
2008-11-03 20:22:12 +00:00
Dan Gohman
bde853911f
Overload AddInteger on int/long/long long instead of on int/int64_t,
...
to avoid overload ambiguities. This fixes build errors introduced
by r58623.
llvm-svn: 58632
2008-11-03 19:40:18 +00:00
Devang Patel
fe57d109b6
Ignore conditions that are outside the loop.
...
llvm-svn: 58631
2008-11-03 19:38:07 +00:00
Andrew Lenharth
348f3fa6a7
add a period at the end of the comment, ignoring the fact that the comment would be hard pressed to be considered a sentence, but if it makes Bill happy...
...
llvm-svn: 58630
2008-11-03 19:29:29 +00:00
Jim Grosbach
4d0549e3be
Add binary encoding support for multiply instructions. Some blanks left to fill in, but the basics are there.
...
llvm-svn: 58626
2008-11-03 18:38:31 +00:00
Devang Patel
c1631db93b
Turn floating point IVs into integer IVs where possible.
...
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.
llvm-svn: 58625
2008-11-03 18:32:19 +00:00
Dan Gohman
ac41d9f5d8
Refactor various TargetAsmInfo subclasses' TargetMachine members away
...
adding a TargetMachine member to the base TargetAsmInfo class instead.
llvm-svn: 58624
2008-11-03 18:22:42 +00:00
Dan Gohman
d7546abb8a
Change how extended types are represented in MVTs. Instead of fiddling
...
bits, use a union of a SimpleValueType enum and a regular Type*.
This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.
This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.
This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.
llvm-svn: 58623
2008-11-03 17:56:27 +00:00
Daniel Dunbar
d395a1722d
Comment fix.
...
llvm-svn: 58621
2008-11-03 17:33:36 +00:00
Dan Gohman
f9e7f69141
Remove redundant inline keywords from functions defined within
...
class definitions.
llvm-svn: 58620
2008-11-03 17:10:24 +00:00
Andrew Lenharth
45b86322f2
Ensure that we are checking only calls to the function we are interested in specializing
...
llvm-svn: 58615
2008-11-03 16:05:35 +00:00
Anton Korobeynikov
fb2f87bbfe
Testcase for recent llvm-gcc fix
...
llvm-svn: 58611
2008-11-03 14:43:31 +00:00
Duncan Sands
0207a3f897
Make VAARG work with x86 long double (which is
...
10 bytes long, but is passed in 12/16 bytes).
llvm-svn: 58608
2008-11-03 11:51:11 +00:00
Matthijs Kooijman
2530f5fe43
Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.
...
llvm-svn: 58606
2008-11-03 11:16:43 +00:00
Evan Cheng
3a9aead4d4
Silence a compiler warning.
...
llvm-svn: 58598
2008-11-03 07:14:02 +00:00
Nick Lewycky
7874fe900a
Typo
...
llvm-svn: 58594
2008-11-03 03:50:40 +00:00
Nick Lewycky
d73806a9cc
Replace explicit loop with utility function.
...
llvm-svn: 58593
2008-11-03 03:49:14 +00:00
Nick Lewycky
7b14e20a5e
Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
...
We're still waiting on code that actually analyzes them properly.
llvm-svn: 58592
2008-11-03 02:43:49 +00:00
Owen Anderson
b067843863
Revert my last patch until I consult with Evan about it.
...
llvm-svn: 58591
2008-11-03 02:33:28 +00:00
Nick Lewycky
3c6d34a7f0
Changes from Duncan's review:
...
* merge two weak functions by making them both alias a third non-weak fn
* don't reimplement CallSite::hasArgument
* whitelist the safe linkage types
llvm-svn: 58568
2008-11-02 16:46:26 +00:00
Anton Korobeynikov
c11b47911d
Testcase for PR2691
...
llvm-svn: 58567
2008-11-02 16:46:17 +00:00
Anton Korobeynikov
1db1b64e6e
Silence a warning
...
llvm-svn: 58563
2008-11-02 11:47:11 +00:00
Duncan Sands
cede1e035c
Get this building on 64 bit machines (error:
...
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).
llvm-svn: 58561
2008-11-02 09:00:33 +00:00
Owen Anderson
2bb2aaa775
Don't do pre-splitting if doing so would create a value join that did not
...
exist before. Updating the live intervals in that care is tricky in the general
case.
Evan, if you see a tighter guard condition for this, let me know.
llvm-svn: 58560
2008-11-02 08:08:18 +00:00
Oscar Fuentes
0433be6feb
CMake: added a source file.
...
llvm-svn: 58559
2008-11-02 06:01:39 +00:00
Nick Lewycky
d01d42e76c
Add a new MergeFunctions pass. It finds identical functions and merges them.
...
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.
llvm-svn: 58557
2008-11-02 05:52:50 +00:00
Nick Lewycky
8d8acf327b
Fix demanded bits analysis with srem by negative number. Based on a patch
...
by Richard Osborne.
llvm-svn: 58555
2008-11-02 02:41:50 +00:00
Dan Gohman
83eea0b17f
Fix this recently moved code to use the correct type. CI is now a
...
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.
llvm-svn: 58549
2008-11-02 00:17:33 +00:00
Mon P Wang
769134be1e
Added interface to allow clients to create a MemIntrinsicNode for
...
target intrinsics that touches memory
llvm-svn: 58548
2008-11-01 20:24:53 +00:00
Sanjiv Gupta
20b9687450
Reverting back 58505. Will commit it once I have the bc reader/writer/docs
...
ready.
llvm-svn: 58547
2008-11-01 10:57:12 +00:00
Bill Wendling
03f5122c6c
Whitespace fixes. No functionality change.
...
llvm-svn: 58539
2008-10-31 21:26:08 +00:00
Anton Korobeynikov
a411e2a086
Testcase for PR2613
...
llvm-svn: 58537
2008-10-31 20:10:49 +00:00
Anton Korobeynikov
7c5a01f0ec
Invalidate debug/eh/gc labels when unreachable MBB is deleted.
...
Based on patch by Martin Nowack!
llvm-svn: 58536
2008-10-31 20:08:30 +00:00
Evan Cheng
83bf3de134
Add comment.
...
llvm-svn: 58533
2008-10-31 19:56:03 +00:00
Evan Cheng
20dbb3bcad
Use better data structure for ConstPoolId2AddrMap.
...
llvm-svn: 58532
2008-10-31 19:55:13 +00:00
Evan Cheng
44994e0c77
Actually make debug output understandable.
...
llvm-svn: 58529
2008-10-31 19:15:52 +00:00
Mon P Wang
ef89465c9f
x86_64 rip-relative and magic mode address
...
llvm-svn: 58528
2008-10-31 19:13:42 +00:00
Evan Cheng
8fce66a47c
Forgot this in last commit.
...
llvm-svn: 58527
2008-10-31 19:11:09 +00:00
Evan Cheng
467e6e8093
Encode PICADD; some code clean up.
...
llvm-svn: 58526
2008-10-31 19:10:44 +00:00
Dan Gohman
50c76beeb0
Remove some unused virtual function bodies.
...
llvm-svn: 58524
2008-10-31 19:06:33 +00:00
Bill Wendling
d2bc13380f
Revert r58489. It isn't correct for all cases.
...
llvm-svn: 58523
2008-10-31 18:30:19 +00:00
Anton Korobeynikov
21c9705264
Symbol visibility is unsupported on cygwin too.
...
Patch by Jay Foad!
llvm-svn: 58520
2008-10-31 18:05:01 +00:00
Torok Edwin
38cbc4ba20
Add an assert to catch user errors like:
...
MyFunctionPass() : FunctionPass(ID) {}
when the user actually meant to write:
MyFunctionPass() : FunctionPass(&ID) {}
llvm-svn: 58518
2008-10-31 17:27:41 +00:00
Evan Cheng
7e8202fce4
Change x86 register allocation ordering to match that of gcc. Otherwise some tools get confused by prologue generated by llvm.
...
llvm-svn: 58517
2008-10-31 16:52:57 +00:00
Evan Cheng
d1f8c9f4a2
Add a fixme.
...
llvm-svn: 58514
2008-10-31 16:41:59 +00:00
Dan Gohman
71d7e9b667
Totally disable the setSubgraphColor calls temporarily, as they're
...
currently troublesome even for #ifndef NDEBUG builds.
llvm-svn: 58512
2008-10-31 16:12:56 +00:00
Duncan Sands
8758851908
Add a bunch of libcalls for ppcf128 that were somehow
...
completely forgotten about when writing LegalizeTypes.
llvm-svn: 58508
2008-10-31 14:06:52 +00:00
Sanjiv Gupta
e3ba47b71b
For some targets pointer and int are 16-bits. Allow 16-bits as a valid index
...
in such cases.
llvm-svn: 58505
2008-10-31 10:26:20 +00:00
Bill Wendling
6d70df0b05
Don't skip over all "terminator" instructions when determining where to put the
...
callee-saved restore code. It could skip over conditional jumps
accidentally. Instead, just skip the "return" instructions.
llvm-svn: 58489
2008-10-31 04:00:23 +00:00
Daniel Dunbar
a1c4fcfc29
Fix warning.
...
llvm-svn: 58486
2008-10-31 01:50:01 +00:00
Oscar Fuentes
39304667af
CMake: Fix some unwanted commentary line wraps on the last change.
...
llvm-svn: 58485
2008-10-31 01:37:26 +00:00
Oscar Fuentes
c999dfadf1
CMake: Establish dependencies among executables and libraries, using
...
data manually extracted from llvm-config.
llvm-svn: 58484
2008-10-31 01:24:51 +00:00
Dan Gohman
99cdf8893e
Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
...
vector element 0 for a store, as it's smaller and faster.
llvm-svn: 58483
2008-10-31 00:57:24 +00:00
Jim Grosbach
2589604d85
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
...
llvm-svn: 58475
2008-10-30 23:44:39 +00:00
Evan Cheng
c696ef9b11
I think we got non-machine specific constpool entries covered.
...
llvm-svn: 58474
2008-10-30 23:43:36 +00:00
Cedric Venet
6c9f3ec66c
Change the name of the generated solution file for a CMake build. (from 'project' to 'LLVM').
...
!!!!!!!!!! Warning !!!!!!!!!!!!!!!
If you already have created a solution with cmake, you will need to manually open to the new one.
llvm-svn: 58461
2008-10-30 21:22:00 +00:00
Duncan Sands
aa53c491b2
Testcase for PR2987.
...
llvm-svn: 58459
2008-10-30 21:13:11 +00:00
Dan Gohman
13cbcf1c18
Canonicalize sext(i1) to i1?-1:0, and update various instcombine
...
optimizations accordingly.
llvm-svn: 58457
2008-10-30 20:40:10 +00:00
Duncan Sands
8311657b98
Testcase for PR2986.
...
llvm-svn: 58456
2008-10-30 20:34:30 +00:00
Duncan Sands
e18295c258
Fix PR2986: do not use a potentially illegal
...
type for the shift amount type. Add a check
that shifts and rotates use the type returned
by getShiftAmountTy for the amount. This
exposed some problems in CellSPU and PPC,
which have already been fixed.
llvm-svn: 58455
2008-10-30 20:26:50 +00:00
Duncan Sands
1310574b0f
Shift amounts should have type getShiftAmountTy
...
(i32 for PPC, not i8). Correct this, and some
formatting while there.
llvm-svn: 58451
2008-10-30 19:28:32 +00:00
Daniel Dunbar
3933e66a89
Add InlineCost class for represent the estimated cost of inlining a
...
function.
- This explicitly models the costs for functions which should
"always" or "never" be inlined. This fixes bugs where such costs
were not previously respected.
llvm-svn: 58450
2008-10-30 19:26:59 +00:00
Duncan Sands
0852f48d1d
Shift amounts should have the type given by
...
getShiftAmountTy (i32 in the case of CellSPU).
llvm-svn: 58449
2008-10-30 19:24:28 +00:00
Mon P Wang
01b8a5a967
Add missing vsetcc expansion for widening
...
llvm-svn: 58443
2008-10-30 18:21:52 +00:00
Oscar Fuentes
50af02391b
CMake: Reverted some unintentional changes on the previous commit.
...
llvm-svn: 58435
2008-10-30 17:21:37 +00:00
Oscar Fuentes
876aa17142
CMake: Cygwin pretends to be Unix.
...
Patch by Jay Foad.
llvm-svn: 58434
2008-10-30 17:15:54 +00:00
Evan Cheng
66cff408ff
ARM JIT should observe -relocation-model command line option.
...
llvm-svn: 58433
2008-10-30 16:10:54 +00:00
Mon P Wang
58c3794c27
Add initial support for vector widening. Logic is set to widen for X86.
...
One will only see an effect if legalizetype is not active. Will move
support to LegalizeType soon.
llvm-svn: 58426
2008-10-30 08:01:45 +00:00
Chris Lattner
7292fb191f
mention fortran status.
...
llvm-svn: 58416
2008-10-30 03:58:13 +00:00
Scott Michel
487c43412d
Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
...
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.
N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.
llvm-svn: 58415
2008-10-30 01:51:48 +00:00
Bill Wendling
af7059edbf
Revert r58411. The user needs to #define this when using the JITMemoryManager.h header.
...
llvm-svn: 58414
2008-10-30 01:22:58 +00:00
Dan Gohman
97acad13de
Spell DISABLE_ASSERTIONS correctly.
...
llvm-svn: 58413
2008-10-30 01:08:03 +00:00
Bill Wendling
f11b321b28
Revert part of r58048. It was breaking on SnowLeopard claiming that
...
"__STDC_CONSTANT_MACROS" needs to be #defined first.
llvm-svn: 58411
2008-10-30 00:11:55 +00:00
Evan Cheng
19d64ba8bf
Correct way to handle CONSTPOOL_ENTRY instructions.
...
llvm-svn: 58409
2008-10-29 23:55:43 +00:00
Evan Cheng
de9dbc5584
Add debugging support.
...
llvm-svn: 58408
2008-10-29 23:55:17 +00:00
Evan Cheng
4421a114bb
Let target resolve some relocation results.
...
llvm-svn: 58407
2008-10-29 23:54:46 +00:00
Evan Cheng
d520a5296a
This is not needed anymore.
...
llvm-svn: 58406
2008-10-29 23:54:10 +00:00
Evan Cheng
34bd7fbb13
Add a bit to MachineRelocation that tells JIT that target is responsible for resolving the address. e.g. ARM constpool.
...
llvm-svn: 58405
2008-10-29 23:53:42 +00:00
Nate Begeman
534ac08ebd
Fix PEXTRQ encoding
...
llvm-svn: 58403
2008-10-29 23:07:17 +00:00
Chris Lattner
7ee0012707
add testcase for PR2964
...
llvm-svn: 58393
2008-10-29 18:42:22 +00:00
Dale Johannesen
98aa9d3e49
Add a RM pseudoreg for the rounding mode, which
...
allows ppcf128->int conversion to work with
DeadInstructionElimination. This is now turned
off but RM is harmless. It does not do a complete
job of modeling the rounding mode.
Revert marking MFCR as using all 7 CR subregisters;
while correct, this caused the problem in PR 2964,
plus the local RA crash noted in the comments.
This was needed to make DeadInstructionElimination,
but as we are not running that, it is backed out
for now. Eventually it should go back in and the
other problems fixed where they're broken.
llvm-svn: 58391
2008-10-29 18:26:45 +00:00
Duncan Sands
57b754612c
Testcase for PR2917.
...
llvm-svn: 58389
2008-10-29 18:06:20 +00:00
Duncan Sands
ee273419f9
Uniformize capitalization of NodeId.
...
llvm-svn: 58386
2008-10-29 17:52:12 +00:00
Chris Lattner
0934c0f35b
Fix PR2967 by not deleting volatile load/stores that occur before unreachable.
...
I don't really see this as being needed, but there is little harm from doing
it.
llvm-svn: 58385
2008-10-29 17:46:26 +00:00
Torok Edwin
49c28e4599
fix typo
...
llvm-svn: 58384
2008-10-29 16:32:06 +00:00
Duncan Sands
f33c3bc51f
Make the declaration of bzero match size_t on
...
x86-64-linux.
llvm-svn: 58383
2008-10-29 15:57:37 +00:00
Duncan Sands
fbb10bbec4
Fix PR2977: LegalizeTypes support for expanding
...
VAARG.
llvm-svn: 58379
2008-10-29 14:25:28 +00:00
Duncan Sands
17e678be87
Add sanity checking for BUILD_PAIR (I noticed the
...
other day that PPC custom lowering could create
a BUILD_PAIR of two f64 with a result type of...
f64! - already fixed). Fix a place that triggers
the sanity check.
llvm-svn: 58378
2008-10-29 14:22:20 +00:00
Evan Cheng
ce3ccc1ea0
- More pre-split fixes: spill slot live interval computation bug; restore point bug.
...
- If a def is spilt, remember its spill index to allow its reuse.
llvm-svn: 58375
2008-10-29 08:39:34 +00:00
Duncan Sands
b964813b1f
Fix a FIXME: in ReplaceNodeWith, if the new node
...
is morphed by AnalyzeNewNode into a previously
processed node, and different result values of
that node are remapped to values with different
nodes, then we could end up using wrong values
here [we were assuming that all results remap
to values with the same underlying node]. This
seems theoretically possible, but I don't have
a testcase. The meat of the patch is in the
changes to AnalyzeNewNode/AnalyzeNewValue and
ReplaceNodeWith. While there, I changed names
like RemapNode to RemapValue, since it really
remaps values. To tell the truth, I would be
much happier if we were only remapping nodes
(it would simplify a bunch of logic, and allow
for some cute speedups) but I haven't yet worked
out how to do that.
llvm-svn: 58372
2008-10-29 06:42:19 +00:00
Duncan Sands
914745768e
Fix 80 column violations.
...
llvm-svn: 58371
2008-10-29 06:33:00 +00:00
Duncan Sands
d4ec020734
Fix 80 column violations.
...
llvm-svn: 58370
2008-10-29 06:31:03 +00:00
Evan Cheng
938e201528
- Rewrite code that update register live interval that's split.
...
- Create and update spill slot live intervals.
- Lots of bug fixes.
llvm-svn: 58367
2008-10-29 05:06:14 +00:00
Oscar Fuentes
2500aaebdd
CMake: Removed some cruft.
...
llvm-svn: 58358
2008-10-29 02:33:15 +00:00
Daniel Dunbar
e7fbf9f425
Factor shouldInline method out of Inliner.
...
- No functionality change.
llvm-svn: 58355
2008-10-29 01:02:02 +00:00
David Greene
125f96d369
Don't force things to be Value * when they're not.
...
llvm-svn: 58354
2008-10-29 00:30:54 +00:00
Daniel Dunbar
cc20455346
Assorted comment/naming fixes, 80-col violations, and reindentation.
...
- No functionality change.
llvm-svn: 58352
2008-10-28 23:24:26 +00:00
Dan Gohman
2c34c130bf
(A & sext(C)) | (B & ~sext(C) -> C ? A : B
...
llvm-svn: 58351
2008-10-28 22:38:57 +00:00
Dan Gohman
1e3c25ac2d
Take Chris' suggestion and define EnableFastISelVerbose and
...
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.
llvm-svn: 58350
2008-10-28 20:35:31 +00:00
Chris Lattner
8f243a5dde
llvm-ld doesn't have a -march option. This fixes PR2961
...
llvm-svn: 58345
2008-10-28 20:05:06 +00:00
Daniel Dunbar
db0b70a937
Reuse PrintEscapedString for printing names in .ll
...
- One functionality change, '\\' in a name is now printed as a hex
escape instead of "\\\\". This is consistent with other users of
PrintEscapedString.
llvm-svn: 58343
2008-10-28 19:33:02 +00:00
Dan Gohman
e750bb67ee
Protect the code for fast-isel debugging with #ifndef NDEBUG.
...
llvm-svn: 58340
2008-10-28 19:08:46 +00:00
Dan Gohman
f15195d8a9
Add some more information to the top-level comment for this file.
...
llvm-svn: 58339
2008-10-28 18:47:37 +00:00
Jim Grosbach
ff2b4948ce
Support for constant islands in the ARM JIT.
...
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the
instruction stream.
Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.
For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.
llvm-svn: 58338
2008-10-28 18:25:49 +00:00
Torok Edwin
df851ff94f
fix prototype of print, it is (llvm/Pass.h):
...
virtual void print(std::ostream &O, const Module *M) const;
instead of
virtual void print(llvm::OStream &O, const Module *M) const;
as the docs say
llvm-svn: 58337
2008-10-28 17:29:23 +00:00
Evan Cheng
c0468cf03c
Avoid calls to setSubgraphColor in release mode. They generate lots of error messages and slow down compilation.
...
llvm-svn: 58336
2008-10-28 17:23:13 +00:00
Tanya Lattner
e660fa88ee
Do not allow a user to set the operand for a constant.
...
llvm-svn: 58335
2008-10-28 17:22:40 +00:00
Torok Edwin
7b747ef017
fix duplicate anchor names, and broken anchor links from the TOC
...
llvm-svn: 58332
2008-10-28 16:54:34 +00:00
Duncan Sands
4068a7f31e
Fix darwin ppc llvm-gcc build breakage: intercept
...
ppcf128 to i32 conversion and expand it into a code
sequence like in LegalizeDAG. This needs custom
ppc lowering of FP_ROUND_INREG, so turn that on and
make it work with LegalizeTypes. Probably PPC should
simply custom lower the original conversion.
llvm-svn: 58329
2008-10-28 15:00:32 +00:00
Duncan Sands
b68694f17d
Turn off LegalizeTypes for this test for the
...
moment, while waiting for a proper solution.
llvm-svn: 58324
2008-10-28 09:55:04 +00:00
Duncan Sands
f3e5850f80
Fix a testcase provided by Bill in which the node
...
id could end up being wrong mostly because of
forgetting to remap new nodes that morphed into
processed nodes through CSE.
llvm-svn: 58323
2008-10-28 09:38:36 +00:00
Chris Lattner
5fa1040130
Don't produce invalid comparisons after legalize.
...
llvm-svn: 58320
2008-10-28 07:11:07 +00:00
Chris Lattner
56d016ab05
fix some whitespace stuff
...
llvm-svn: 58319
2008-10-28 07:10:51 +00:00
Chris Lattner
a2422d8f3e
fit in 80 cols
...
llvm-svn: 58318
2008-10-28 06:20:17 +00:00
Chris Lattner
38461f6b2f
Fix a nasty miscompilation of 176.gcc on linux/x86 where we synthesized
...
a memset using 16-byte XMM stores, but where the stack realignment code
didn't work. Until it does (PR2962) disable use of xmm regs in memcpy
and memset formation for linux and other targets with insufficiently
aligned stacks.
This is part of PR2888
llvm-svn: 58317
2008-10-28 05:49:35 +00:00
Chris Lattner
50bfa4306a
more comment cleanups.
...
llvm-svn: 58316
2008-10-28 05:32:08 +00:00
Chris Lattner
9356a868ef
comment cleanups.
...
llvm-svn: 58315
2008-10-28 05:31:31 +00:00
Evan Cheng
5e88d90379
If def is in the same mbb as the barrier, spilt the value after the last use before the barrier.
...
llvm-svn: 58314
2008-10-28 05:28:21 +00:00
Evan Cheng
9f854697e4
Add command line option to limit the number splits to help debugging.
...
llvm-svn: 58312
2008-10-28 01:48:24 +00:00
Dan Gohman
7634f6379f
Fix the name of the include guard to match the filename.
...
llvm-svn: 58310
2008-10-28 00:52:46 +00:00
Evan Cheng
fab31680e1
Avoid putting a split past the end of the live range; always shrink wrap live interval in the barrier mbb.
...
llvm-svn: 58309
2008-10-28 00:47:49 +00:00
Bill Wendling
6e4ffba212
- Fix SUBVERSION string to handle x.x.x version number formats.
...
- Add VERBOSE=1 flag.
- Specify the LLVM_SUBMIT_VERSION when doing the "make install".
The libLTO.dylib relies upon this flag during that time.
llvm-svn: 58298
2008-10-27 23:31:24 +00:00
Evan Cheng
e67ad47a00
Silence a bogus compile time warning.
...
llvm-svn: 58297
2008-10-27 23:29:28 +00:00
David Greene
aebd9e01d7
Re-apply 55137 with fixes.
...
llvm-svn: 58296
2008-10-27 23:24:03 +00:00
Evan Cheng
f46642ada6
Remove val# defined by a remat'ed def that is now dead.
...
llvm-svn: 58294
2008-10-27 23:21:01 +00:00
Ted Kremenek
8fcff4d87a
Fix bogus comparison of "const char *" with c-string literal. Use strcmp instead.
...
llvm-svn: 58290
2008-10-27 22:43:07 +00:00
David Greene
ce2a938186
Have TableGen emit setSubgraphColor calls under control of a -gen-debug
...
flag. Then in a debugger developers can set breakpoints at these calls
to see waht is about to be selected and what the resulting subgraph
looks like. This really helps when debugging instruction selection.
llvm-svn: 58278
2008-10-27 21:56:29 +00:00
Daniel Dunbar
e3aa50c280
Return bool (inserted) from StringSet::insert as for StringMap::insert.
...
llvm-svn: 58268
2008-10-27 20:50:02 +00:00
Cedric Venet
4e6ad3c12b
Remove tabs from my previous commit.
...
llvm-svn: 58263
2008-10-27 19:21:35 +00:00
Chris Lattner
b5cf101fa2
rename vec_spat -> vec_splat, pointed out by duncan
...
llvm-svn: 58260
2008-10-27 18:28:24 +00:00
David Greene
b04e7c36d3
Add setSubgraphColor to color an entire portion of a SelectionDAG. This
...
will be used to support debug features in TableGen.
llvm-svn: 58257
2008-10-27 18:17:03 +00:00
David Greene
f9812d8166
Add STL-style typedefs and default constructors to make it possible to
...
use DenseMap in more contexts.
llvm-svn: 58256
2008-10-27 18:15:15 +00:00
David Greene
b00b267bcc
Fix PR2634. Create new virtual registers from spills early so that we
...
can give it the same stack slot as the spilled interval if it is folded.
This prevents the fold/unfold code from pointing to the wrong register.
llvm-svn: 58255
2008-10-27 17:38:59 +00:00
Matthijs Kooijman
d470f73e2c
Remove redundant word in tblgen error message.
...
llvm-svn: 58250
2008-10-27 15:59:43 +00:00
Duncan Sands
835bdca590
Fix UpdateNodeOperands so that it does CSE of calls
...
(and a bunch of other node types). While there, I
added a doNotCSE predicate and used it to reduce code
duplication (some of the duplicated code was wrong...).
This fixes ARM/cse-libcalls.ll when using LegalizeTypes.
llvm-svn: 58249
2008-10-27 15:30:53 +00:00
Duncan Sands
75cf2e03ab
Fix a bug in which a node could be added to the
...
worklist twice: UpdateNodeOperands could morph
a new node into a node already on the worklist.
We would then recalculate the NodeId for this
existing node and add it to the worklist. The
testcase is ARM/cse-libcalls.ll, the problem
showing up once UpdateNodeOperands is taught to
do CSE for calls.
llvm-svn: 58246
2008-10-27 13:18:32 +00:00
Torok Edwin
450ffd2f3e
Avoid crashing if instruction is not part of a loop.
...
If it is not part of a loop it is obviously invariant wrt to all loops.
llvm-svn: 58240
2008-10-27 10:18:45 +00:00
Gabor Greif
bb026a0c63
formatting tweak for intrinsic
...
llvm-svn: 58239
2008-10-27 10:17:24 +00:00
Torok Edwin
ca97b42ef7
export an ID for the instructionNamer, allowing analysis/transformation passes
...
that need it to require it by ID.
llvm-svn: 58238
2008-10-27 10:16:27 +00:00
Bill Wendling
ef36246c6f
Some grammar fixes, and non-invasive format changes.
...
llvm-svn: 58237
2008-10-27 09:27:33 +00:00
Duncan Sands
8475d56794
Turn on LegalizeTypes, the new type legalization
...
codegen infrastructure, by default. Please report
any breakage to the mailing lists.
llvm-svn: 58232
2008-10-27 08:42:46 +00:00
Nick Lewycky
c5a68d26d9
Fix an obvious copy/pasto.
...
llvm-svn: 58231
2008-10-27 07:28:44 +00:00
Evan Cheng
f713722975
For now, don't split live intervals around x87 stack register barriers. FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them.
...
llvm-svn: 58230
2008-10-27 07:14:50 +00:00
Chris Lattner
59b5691388
Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic. With the power of
...
LargeBlockInfo, we can now dramatically simplify their implementation
and speed them up at the same time. Now the code has time proportional
to the number of uses of the alloca, not the size of the block.
This also eliminates code that tried to batch up different allocas which
are used in the same blocks, and eliminates the 'retry list' logic which
was baroque and no unneccesary. In addition to being a speedup for crazy
cases, this is also a nice cleanup:
PromoteMemoryToRegister.cpp | 270 +++++++++++++++-----------------------------
1 file changed, 96 insertions(+), 174 deletions(-)
llvm-svn: 58229
2008-10-27 07:05:53 +00:00
Chris Lattner
a9642ff459
no need to print output
...
llvm-svn: 58228
2008-10-27 06:56:35 +00:00
Chris Lattner
f594ecc453
Add a new LargeBlockInfo helper, which is just a wrapper around
...
a trivial dense map. Use this in RewriteSingleStoreAlloca to
avoid aggressively rescanning blocks over and over again. This
fixes PR2925, speeding up mem2reg on the testcase in that bug
from 4.56s to 0.02s in a debug build on my machine.
llvm-svn: 58227
2008-10-27 06:05:26 +00:00
Chris Lattner
bf2262270e
mention getresult -> extractvalue (PR2935)
...
llvm-svn: 58226
2008-10-27 04:39:23 +00:00
Dale Johannesen
1d7e42c8fe
Increase default setting of tail-merge-threshold to
...
150, based on llvm-test measurements.
llvm-svn: 58225
2008-10-27 02:10:21 +00:00
Nick Lewycky
f5ba827d41
Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code.
...
Note that -check-exit-code was on by default while -append-exit-code is not.
llvm-svn: 58221
2008-10-26 23:59:36 +00:00
Chris Lattner
2bfc72e65e
fix PR2953, an off-by-one error handling formatted i/o.
...
Thanks to Török Edwin for the awesome reduced testcase.
llvm-svn: 58199
2008-10-26 19:20:47 +00:00
Chris Lattner
a43f2b21e7
remove eh output from this test.
...
llvm-svn: 58196
2008-10-26 18:53:07 +00:00
Cedric Venet
10a11f033c
Add a default constructor to AsmWriterOperand to make VS2008sp1 happy. (AsmWriterOperand is used in a std::pair, and VS need to generate the default constructor of this pair).
...
llvm-svn: 58185
2008-10-26 15:40:44 +00:00
Evan Cheng
ed033ede22
Do not shrink wrap live interval in a mbb if it's livein any of its successor blocks. The mbb can be revisited again after all of the successors are processed.
...
llvm-svn: 58184
2008-10-26 07:49:03 +00:00
Oscar Fuentes
29a0da5f8e
Return something (i.e. NULL) from an unimplemented virtual function.
...
llvm-svn: 58183
2008-10-26 04:26:33 +00:00
Oscar Fuentes
e638f5d854
CMake: If we have `clang' under the `tools/' subdirectory, add it to
...
the build.
llvm-svn: 58179
2008-10-26 00:52:09 +00:00
Oscar Fuentes
20baf2fc3c
CMake: Support for LLVM_USED_LIBS variable, which is the cmake
...
counterpart of USED_LIBS.
llvm-svn: 58178
2008-10-26 00:51:05 +00:00
Oscar Fuentes
ca0b988a21
CMake: Removed unnecessary macro definitions. They are defined in
...
config.h
llvm-svn: 58177
2008-10-26 00:50:03 +00:00
Oscar Fuentes
bf81f792cd
CMake: GetTargetTriple: new module for determining the target
...
triple. Assign to LLVM_HOSTTRIPLE so it figures in config.h.
llvm-svn: 58176
2008-10-26 00:47:52 +00:00
Bill Wendling
97f7de8875
Fix type-o in ExprMapKeyType::operator ==(). The "&&" was missing.
...
Patch by Frits van Bommel!
llvm-svn: 58175
2008-10-26 00:19:56 +00:00
Evan Cheng
f48367b8e9
Handle cases where there aren't uses in the barrier mbb.
...
llvm-svn: 58174
2008-10-25 23:49:39 +00:00
Evan Cheng
6be78004a5
Add storeRegTo{StackSlot|Addr} and loadRegFrom{StackSlot|Addr} descriptions.
...
llvm-svn: 58164
2008-10-25 23:08:22 +00:00
Dan Gohman
f856f50463
Make comments and code for QuietWarnings and QuietErrors
...
actually correspond to what their names suggest.
llvm-svn: 58146
2008-10-25 17:57:20 +00:00
Dan Gohman
811eed81ab
SDNodes may have at most one Flag result. Update this comment
...
to reflect that.
llvm-svn: 58145
2008-10-25 17:51:24 +00:00
Dan Gohman
191453174d
Move the code that adds the DeadMachineInstructionElimPass from
...
target-independent code to target-specific code. This prevents it
from running on targets that aren't using fast-isel.
In addition to saving compile time, this addresses the problem
that not all targets are prepared for it. In order to use this
pass, all instructions must declare all their fixed uses and
defs of physical registers.
llvm-svn: 58144
2008-10-25 17:46:52 +00:00
Gordon Henriksen
bf40eee91a
Related to PR2911, reject as invalid non-pointer GC roots.
...
llvm-svn: 58143
2008-10-25 16:28:35 +00:00
Nicolas Geoffray
5457ce9ac3
Support for allocation of TLS variables in the JIT. Allocation of a global
...
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.
llvm-svn: 58142
2008-10-25 15:41:43 +00:00
Nicolas Geoffray
db30612fc4
Generate code for TLS instructions.
...
llvm-svn: 58141
2008-10-25 15:22:06 +00:00
Bruno Cardoso Lopes
24eb3de4c2
Added MIPS release notes.
...
llvm-svn: 58139
2008-10-25 14:56:26 +00:00
Oscar Fuentes
24617b7152
CMake: Directed bug reports to llvmbugs.
...
llvm-svn: 58134
2008-10-25 03:49:35 +00:00
Oscar Fuentes
9ba4650b76
CMake: lib/Target/ARM/AsmPrinter/CMakeLists.txt added.
...
llvm-svn: 58133
2008-10-25 03:40:32 +00:00
Oscar Fuentes
a9ac909248
CMake: MSVC++ no longer uses a special configuration method.
...
llvm-svn: 58132
2008-10-25 03:29:36 +00:00
Oscar Fuentes
593bb21ded
CMake: Sync'ed DataTypes.h.cmake with DataTypes.h.in.
...
llvm-svn: 58131
2008-10-25 03:25:11 +00:00
Oscar Fuentes
c4b5c8c1ed
CMake: Cross-platform support for using pre-generated llvmAsmParser.cpp and llvmAsmParser.h.
...
llvm-svn: 58130
2008-10-25 03:19:08 +00:00
Evan Cheng
85d71d4588
If val# def is ~0U, meaning it's defined by a PHI, and it's previously split, spill before the barrier because it's impossible to determine if all the defs are spilled in the same spill slot.
...
llvm-svn: 58129
2008-10-25 00:52:41 +00:00
Dale Johannesen
71f361e758
Mark MFCR as reading all condition code registers.
...
Prevents some more overzealous deletions (mostly
in AltiVec code).
llvm-svn: 58121
2008-10-24 22:08:01 +00:00
Dale Johannesen
3863f8e725
Rewrite logic to figure out whether LR needs to
...
be saved/restored in the prolog/epilog. We need
to do this iff something in the function stores
into it.
llvm-svn: 58116
2008-10-24 21:24:23 +00:00
Dale Johannesen
e45896fc4f
Be kind to non-x86 hosts.
...
llvm-svn: 58113
2008-10-24 21:20:25 +00:00
Torok Edwin
33986d8f17
move the note to the correct README
...
llvm-svn: 58104
2008-10-24 19:23:07 +00:00
Torok Edwin
fcaae54669
add note about va_arg code on x86 and x86-64
...
llvm-svn: 58103
2008-10-24 19:20:05 +00:00
Evan Cheng
cd160f9859
Fix a pasto.
...
llvm-svn: 58102
2008-10-24 18:46:44 +00:00
Duncan Sands
014f5bbaad
Fix translateX86CC: if SetCCOpcode is SETULE and
...
LHS is a foldable load, then LHS and RHS are swapped
and SetCCOpcode is changed to SETUGT. But the later
code is expecting operands to be the wrong way round
for SETUGT, but they are not in this case, resulting
in an inverted compare. The solution is to move the
load normalization before the correction for SETUGT.
This bug was tickled by LegalizeTypes which happened
to legalize the testcase slightly differently to
LegalizeDAG.
llvm-svn: 58092
2008-10-24 13:03:10 +00:00
Cedric Venet
a00d112486
Modify the cmake build system so that if it doesn't find bison, it will use the pregenerated file in from the svn (.cvs). Work only for windows for the moment. Tested on Vista64 with MSVC2008express.
...
llvm-svn: 58090
2008-10-24 11:24:33 +00:00
Steve Naroff
7fb14b0cd0
Add a file to VC++ proj.
...
llvm-svn: 58089
2008-10-24 10:38:57 +00:00
Nick Lewycky
730d5dade6
Don't try to create a mask when we don't need one. Fixes a crash.
...
llvm-svn: 58075
2008-10-24 06:14:27 +00:00
Evan Cheng
f8b09d424d
Fix a end() dereference; remove an abort() that wasn't meant to be left in.
...
llvm-svn: 58072
2008-10-24 05:53:44 +00:00
Nick Lewycky
f6e4dca67e
Add value range analyzing of Add and Sub.
...
Understand that mul %x, 1 = %x.
llvm-svn: 58069
2008-10-24 04:00:26 +00:00
Evan Cheng
4bac4d0a16
Avoid splitting an interval multiple times; avoid splitting re-materializable val# (for now).
...
llvm-svn: 58068
2008-10-24 02:05:00 +00:00
Dan Gohman
712886f561
Fix constant-offset emission for x86-64 absolute addresses. This
...
fixes a bunch of test-suite JIT failures on x86-64 in
-relocation-model=static mode.
llvm-svn: 58066
2008-10-24 01:57:54 +00:00
Steve Naroff
886b5193a7
Add file to VC++ project.
...
llvm-svn: 58060
2008-10-24 01:21:47 +00:00
Dale Johannesen
8b531d2754
Initialize uninitialized variable.
...
llvm-svn: 58057
2008-10-24 01:06:58 +00:00
Ted Kremenek
3c6de496b0
Added raw_fd_ostream::close().
...
llvm-svn: 58052
2008-10-23 23:49:09 +00:00
Steve Naroff
a6090204a1
Changes to make the Windows build work...
...
- Add a file to the VC++ project.
- Make sure the clang driver links against the Transforms library.
- Incorporate changes from patch by Dan Gohman.
llvm-svn: 58048
2008-10-23 23:28:23 +00:00
Evan Cheng
d0d0317b9a
Committing a good chunk of the pre-register allocation live interval splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible.
...
llvm-svn: 58044
2008-10-23 20:43:13 +00:00
Dale Johannesen
e395d78657
Mark defs and uses of CTR and LR correctly.
...
Prevents DeadMachineInstructionElim from thinking
things like MTCTR are dead (fixes massive
testsuite breakage at -O0).
llvm-svn: 58043
2008-10-23 20:41:28 +00:00
Daniel Dunbar
f4be24686f
Make sure to set stdout to binary when writing bitcode files via
...
std::ostream API.
llvm-svn: 58042
2008-10-23 19:37:34 +00:00