Chris Lattner
a5ca93cdd5
make SectionFlagsForGlobal a private static function instead of a public
...
virtual one.
llvm-svn: 76973
2009-07-24 16:46:50 +00:00
Chris Lattner
552b407f8f
move a method up in the file, GV is always non-null, so remove a check.
...
llvm-svn: 76972
2009-07-24 16:44:01 +00:00
Chris Lattner
b34d0a2fcb
There is no need to pass the name into lib/Target/TargetAsmInfo.cpp
...
when we have a global with no section explicitly specified.
llvm-svn: 76971
2009-07-24 16:40:45 +00:00
Chris Lattner
71b6d6946c
remove a use of SectionFlagsForGlobal.
...
llvm-svn: 76970
2009-07-24 16:40:09 +00:00
Daniel Dunbar
555d1001d5
Another getName -> getNameStr
...
llvm-svn: 76967
2009-07-24 12:21:08 +00:00
Daniel Dunbar
f26e740c89
More move to raw_ostream.
...
llvm-svn: 76966
2009-07-24 10:47:20 +00:00
Daniel Dunbar
796e43eede
Move more to raw_ostream, provide support for writing MachineBasicBlock,
...
LiveInterval, etc to raw_ostream.
llvm-svn: 76965
2009-07-24 10:36:58 +00:00
Daniel Dunbar
b99eac8814
Move more to raw_ostream.
...
llvm-svn: 76964
2009-07-24 10:05:20 +00:00
Daniel Dunbar
8ef0735dd5
Move to raw_ostream.
...
llvm-svn: 76963
2009-07-24 09:53:24 +00:00
Daniel Dunbar
12368685d8
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Daniel Dunbar
cd51ea510a
Allow llvm_report_error to accept a Twine.
...
llvm-svn: 76961
2009-07-24 07:58:10 +00:00
Eli Friedman
95fc6ee51a
Remove unused member functions.
...
llvm-svn: 76960
2009-07-24 07:43:59 +00:00
Daniel Dunbar
c4b4ad236d
Fix constructor types
...
llvm-svn: 76958
2009-07-24 07:12:20 +00:00
Daniel Dunbar
0cf4e697fd
Update CMake
...
llvm-svn: 76957
2009-07-24 07:04:49 +00:00
Daniel Dunbar
afcf5b30cb
Add Twine ADT.
...
- Not currently used.
llvm-svn: 76956
2009-07-24 07:04:27 +00:00
Evan Cheng
3990850a7d
Convert a test to FileCheck.
...
llvm-svn: 76954
2009-07-24 06:01:46 +00:00
Chris Lattner
dd2096898b
hoist section name uniquing logic up to the top-level SectionForGlobal
...
implementation, eliminating a dupe.
llvm-svn: 76953
2009-07-24 05:10:25 +00:00
Chris Lattner
febe552dbd
Implement getSectionPrefixForUniqueGlobal to return null, indicating that
...
darwin does it's own unique and special and wonderful thing.
llvm-svn: 76952
2009-07-24 05:02:38 +00:00
Chris Lattner
c21c02aacd
reduce indentation
...
llvm-svn: 76951
2009-07-24 05:01:55 +00:00
Chris Lattner
ddf377df1a
simplify code by making special case more obvious
...
llvm-svn: 76950
2009-07-24 04:59:43 +00:00
Chris Lattner
ab0c0ef515
the 'isWeakForLinker' code is common between functions and globals, hoist it
...
and simplify some other code.
llvm-svn: 76949
2009-07-24 04:52:38 +00:00
Chris Lattner
0f5ebf5509
Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
...
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.
llvm-svn: 76948
2009-07-24 04:49:34 +00:00
Chris Lattner
68d64a2d90
document SectionFlags::Named better and make it more easily greppable by
...
eliminating isNamed.
llvm-svn: 76946
2009-07-24 04:26:19 +00:00
Chris Lattner
37e311a570
fix indentation.
...
llvm-svn: 76945
2009-07-24 04:11:40 +00:00
Chris Lattner
1553fdee55
use section flags more correctly.
...
llvm-svn: 76944
2009-07-24 04:08:17 +00:00
Daniel Dunbar
a3d677b002
Switch to raw_ostream.
...
llvm-svn: 76943
2009-07-24 04:01:01 +00:00
Chris Lattner
53f92dc95b
fix a mysterious and scary failure on test/CodeGen/X86/cstring.ll
...
llvm-svn: 76942
2009-07-24 03:55:48 +00:00
Chris Lattner
07bd1cd8c5
reduce api exposure: clients shouldn't call SectionKindForGlobal directly.
...
llvm-svn: 76941
2009-07-24 03:49:17 +00:00
Chris Lattner
5cd4dd391f
make Constant::getRelocationInfo return an enum, as suggested by Duncan.
...
llvm-svn: 76938
2009-07-24 03:27:21 +00:00
Chris Lattner
74b8117134
remove more bits of small section support.
...
llvm-svn: 76937
2009-07-24 03:16:53 +00:00
Chris Lattner
bc63d8bfbf
remove more remnants of small section support.
...
llvm-svn: 76936
2009-07-24 03:14:35 +00:00
Chris Lattner
26aff56462
Remove SectionKind::Small*. This was only used on mips, and is apparently
...
a sad mistake that is regretted. :)
llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Evan Cheng
c3259f3ffb
Thumb2 should use the register scavenger.
...
llvm-svn: 76930
2009-07-24 01:05:51 +00:00
Dan Gohman
5ece69a47c
Fix whitespace.
...
llvm-svn: 76929
2009-07-24 01:03:59 +00:00
Dan Gohman
55b9157dc5
Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
...
llvm-svn: 76928
2009-07-24 01:01:06 +00:00
Dan Gohman
d87cf950e8
Give the SCEV class a SubclassData field.
...
llvm-svn: 76927
2009-07-24 00:59:53 +00:00
Dan Gohman
7daff0abeb
Fix whitespace.
...
llvm-svn: 76926
2009-07-24 00:55:33 +00:00
Evan Cheng
6cfbe61361
FLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions on all sub-targets.
...
llvm-svn: 76925
2009-07-24 00:53:56 +00:00
Richard Osborne
fc39e417a8
Add tests for handling of globals and tls on the XCore. These currently fail
...
but pass when run against r76652.
llvm-svn: 76923
2009-07-24 00:38:20 +00:00
Owen Anderson
0348a13cc6
Privatize the ConstantVector tables.
...
llvm-svn: 76922
2009-07-24 00:36:24 +00:00
Eric Christopher
f37ea3ad75
Update insertps handling based on feedback. Move to a v4f32 style
...
to support vector arguments and scalar arguments correctly. Update
lowering and fix comment to refer to pinsr* instead of insertps.
llvm-svn: 76921
2009-07-24 00:33:09 +00:00
Dan Gohman
17151155ed
Remove the IA-64 backend.
...
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
David Goodwin
cdd405d804
Correctly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more exactly for Thumb-2 to get better code gen.
...
llvm-svn: 76919
2009-07-24 00:16:18 +00:00
Sean Callanan
8ce4021a40
Added a 2+-byte NOP instruction to the Intel tables,
...
for the assembler/disassembler to use.
llvm-svn: 76914
2009-07-23 23:39:34 +00:00
Owen Anderson
909f6001e9
Privatize the ConstantStruct table.
...
llvm-svn: 76912
2009-07-23 23:25:33 +00:00
David Greene
8e621f0182
Write space padding as one string to speed up comment printing.
...
llvm-svn: 76910
2009-07-23 23:21:10 +00:00
Evan Cheng
dc99f07113
Thumb2 does not allow the use of "pc" register as part of the load / store address.
...
llvm-svn: 76909
2009-07-23 23:09:51 +00:00
Reid Kleckner
cbb9348e76
Fixing unittests on 32-bit Darwin, using 0x...ULL instead of 0x...U .
...
llvm-svn: 76904
2009-07-23 22:27:18 +00:00
Reid Kleckner
4b3a356493
Re-committing r76828 with the JIT memory manager changes now that the build
...
bots like the BumpPtrAllocator changes.
llvm-svn: 76902
2009-07-23 21:46:56 +00:00
Chris Lattner
308c7896a4
"fix" PR4612, which is a crash on:
...
%0 = malloc [3758096384 x i32]
The "malloc" instruction doesn't support 64-bits correctly (see PR715),
and should be removed. Victor is actively working on fixing this, in
the meantime just don't crash.
llvm-svn: 76899
2009-07-23 21:26:18 +00:00
Duncan Sands
1f3b8c0d16
Fix PR4614: the Intel C compiler defines _GNUC__
...
but does not provide __builtin_bswap32/64.
llvm-svn: 76896
2009-07-23 19:08:27 +00:00
Duncan Sands
f4981105ca
Revert r75581: it causes massive breakage in the Ada
...
testsuite, due to exception handling not working
correctly. Maybe because the libgcc unwinder is
miscompiled - not sure, and I won't have time to
look into it before leaving on holiday. Note that
miscompilations of libgcc are not picked up by the
nightly testers, because they dynamically link with
libgcc, so pick up the system version rather than
the version built as part of llvm-gcc. This is a
nasty flaw in the nightly testers. (On the other
hand the Ada testsuite links with the just built
libgcc).
llvm-svn: 76895
2009-07-23 19:00:02 +00:00
Daniel Dunbar
84b5f6efb7
Switch ValueSymbolTable to StringRef based API.
...
llvm-svn: 76894
2009-07-23 18:52:12 +00:00
Daniel Dunbar
f01154cf2c
Add llvm::Value::getNameRef, for help in API migration.
...
llvm-svn: 76893
2009-07-23 18:50:53 +00:00
Reid Kleckner
c2d882dd1a
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
...
an off-by-one error.
llvm-svn: 76891
2009-07-23 18:34:13 +00:00
Evan Cheng
d2919a1773
Fix up ARM constant island pass for Thumb2.
...
Also fixed up code to fully use the SoImm field for ADR on ARM mode.
llvm-svn: 76890
2009-07-23 18:27:47 +00:00
Evan Cheng
95a73e2eab
Since we have moved unified assembly, switch to ADR instruction instead of a the difficult-to-read .set + add syntax to materialize pc-relative address.
...
Turns out this also fixed a poor code selection on Thumb1. I have no idea why we were using a mov + add to do the same thing as ADR before.
llvm-svn: 76889
2009-07-23 18:26:03 +00:00
Daniel Dunbar
5bf72e20eb
Convert StringMap to using StringRef for its APIs.
...
- Yay for '-'s and simplifications!
- I kept StringMap::GetOrCreateValue for compatibility purposes, this can
eventually go away. Likewise the StringMapEntry Create functions still follow
the old style.
- NIFC.
llvm-svn: 76888
2009-07-23 18:17:34 +00:00
David Goodwin
6deba28c6f
Fix frame index elimination to correctly handle thumb-2 addressing modes that don't allow negative offsets. During frame elimination convert *i12 opcode to a *i8 when necessary due to a negative offset.
...
llvm-svn: 76883
2009-07-23 17:06:46 +00:00
Andreas Bolka
dcb9f483bf
FileCheck'ize and expand LDA testcases.
...
llvm-svn: 76880
2009-07-23 15:56:53 +00:00
Andrew Lenharth
57e9daaf33
emit simple node was using different labels for fields than the rest of the graph writter
...
llvm-svn: 76879
2009-07-23 15:24:38 +00:00
Andreas Bolka
c8cd3f6959
Cache dependence computation using FoldingSet.
...
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.
llvm-svn: 76877
2009-07-23 14:32:46 +00:00
Evan Cheng
edda8cbfad
80 col violation.
...
llvm-svn: 76872
2009-07-23 07:58:08 +00:00
Chris Lattner
7b9dda45f0
enhance DepthFirstIterator to support more robust operations in the face
...
of code mutating the graph while it is being traversed. Patch by
Olaf Krzikalla!
llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner
7413f07b9d
testcase for PR4590
...
llvm-svn: 76868
2009-07-23 06:07:59 +00:00
Chris Lattner
88ab854873
refactor a blob of code out to a new 'FoldOrOfFCmps' function and
...
simplify it.
llvm-svn: 76866
2009-07-23 05:46:22 +00:00
Lang Hames
077415e84b
For real this time: PHI Def & Kill tracking added to PHIElimination.
...
llvm-svn: 76865
2009-07-23 05:44:24 +00:00
Chris Lattner
7152d39d6d
merge vector-casts-0.ll into vector-casts.ll
...
llvm-svn: 76864
2009-07-23 05:33:39 +00:00
Chris Lattner
7d55541e56
Make some existing optimizations that would only trigger on scalars
...
also apply to vectors. This allows us to compile this:
#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }
to:
_a:
cmpordps %xmm1, %xmm0
ret
_b:
cmpunordps %xmm1, %xmm0
ret
with clang instead of to a ton of horrible code.
llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Chris Lattner
b4ff7de8bd
convert a test to filecheck format. This fixes an endemic problem
...
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.
llvm-svn: 76861
2009-07-23 05:27:48 +00:00
Chris Lattner
4a3affbdcf
rename test
...
llvm-svn: 76860
2009-07-23 05:25:12 +00:00
Chris Lattner
9085438e4b
refactor a bunch of code out into a helper function,
...
no functionality change.
llvm-svn: 76859
2009-07-23 05:14:02 +00:00
Chris Lattner
02def54fa1
remove a really old and dead header
...
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Chris Lattner
dc13b7c637
merge one more sse41 test into sse41.ll
...
llvm-svn: 76853
2009-07-23 04:49:39 +00:00
Chris Lattner
70d5783535
merge another sse41 test into sse41.ll
...
llvm-svn: 76852
2009-07-23 04:43:48 +00:00
Chris Lattner
08fc6e6e40
merge sse41-pmovx.ll into sse41.ll
...
llvm-svn: 76850
2009-07-23 04:39:09 +00:00
Lang Hames
a77a3c3782
Added PHI Def & Kill tracking to PHIElimination pass.
...
llvm-svn: 76849
2009-07-23 04:34:03 +00:00
Chris Lattner
b9cdd3153c
change a test to run in filecheck style. Rename it to be a general
...
dumping ground of various SSE4.1 tests, since filecheck can reasonably
handle them all in one file. Generalize it to check x86-64 stuff as
well since it has a different ABI (a convenient way to test both the
reg and mem forms of these instructions).
llvm-svn: 76848
2009-07-23 04:33:02 +00:00
Eric Christopher
b1b77ca862
Support insertps via the intrinsic and add a couple of simple
...
testcases to make sure it's being generated.
llvm-svn: 76843
2009-07-23 02:22:41 +00:00
Sanjiv Gupta
56df1e7969
Do not call getMangledName on Intrinsics.
...
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Devang Patel
6292003492
MDString
...
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.
llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Eric Christopher
327cb795a1
Add test for pinsrd and pinsrb instructions.
...
llvm-svn: 76840
2009-07-23 01:58:04 +00:00
Andreas Bolka
897e68c660
Minor cosmetics: indentation, formatting, naming.
...
llvm-svn: 76839
2009-07-23 01:57:06 +00:00
Reid Kleckner
921673225c
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
...
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Zhongxing Xu
57421f3e0f
add header for 'memset'.
...
llvm-svn: 76837
2009-07-23 01:38:47 +00:00
Devang Patel
c698122d34
Silence "uninitialized use" warning.
...
llvm-svn: 76836
2009-07-23 01:36:16 +00:00
Devang Patel
8392e3ba37
Hide constructors.
...
llvm-svn: 76835
2009-07-23 01:19:53 +00:00
Devang Patel
e059ba6ed2
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Eric Christopher
fef8db605d
Fix error message for correct opcode.
...
llvm-svn: 76829
2009-07-23 01:01:32 +00:00
Reid Kleckner
1a722d9b73
Make the JIT code emitter properly retry and ask for more memory when it runs
...
out of memory, and also make the default memory manager allocate more memory
when it runs out.
Also, switch function stubs and global data over to using the BumpPtrAllocator.
This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs. I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.
llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Reid Kleckner
5bd6105d65
Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
...
malloc, so there should be no functional changes to other code.
These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.
I also added some tests which helped me pinpoint some bugs.
llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Dan Gohman
b215100c7c
Revert r75663 (and r76805), as it is causing regressions on powerpc.
...
llvm-svn: 76823
2009-07-23 00:09:46 +00:00
Chris Lattner
d2aeef0703
remove SectionFlags::Small: it is only used on Xcore, and we'll find
...
a better solution for it in the future.
llvm-svn: 76818
2009-07-22 23:27:22 +00:00
Dan Gohman
824ab40381
x86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).
...
llvm-svn: 76817
2009-07-22 23:26:55 +00:00
Dan Gohman
cc1cd6f484
Add new keywords to the vim syntax highlighting.
...
llvm-svn: 76812
2009-07-22 22:45:50 +00:00
Dan Gohman
3a353a61fc
Add new optimization keywords to the polygen grammar.
...
llvm-svn: 76811
2009-07-22 22:45:30 +00:00
Dan Gohman
902dfff8b6
Rename the new unsigned and signed keywords to nuw and nsw,
...
which stand for no-unsigned-wrap and no-signed-wrap.
llvm-svn: 76810
2009-07-22 22:44:56 +00:00
David Greene
1164d1f283
Reorder if-else branches as suggested by Bill.
...
llvm-svn: 76808
2009-07-22 22:32:19 +00:00
David Goodwin
a0b2dc93b5
Fix typo in addrmode definition.
...
llvm-svn: 76806
2009-07-22 22:24:31 +00:00
Dan Gohman
cdbef5f2c0
Add -march=ppc32 lines so that this test doesn't ever default to ppc64.
...
llvm-svn: 76805
2009-07-22 22:08:31 +00:00