Chris Lattner
e033e6da08
mingw uses .data and .text, not _data and _text.
...
llvm-svn: 77435
2009-07-29 05:25:42 +00:00
Chris Lattner
c5397abb52
fix PR4584 with a trivial patch now that the pieces are in place.
...
llvm-svn: 77434
2009-07-29 05:20:33 +00:00
Nick Lewycky
f82326b984
Bulk erasing instructions without RAUWing them is unsafe. Instead, break them
...
into a new BB that has no predecessors.
llvm-svn: 77433
2009-07-29 05:17:50 +00:00
Chris Lattner
5034329f8d
pass the mangler down into the various SectionForGlobal methods.
...
No functionality change.
llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Chris Lattner
8f35574c06
constant prop a utostr.
...
llvm-svn: 77430
2009-07-29 04:55:08 +00:00
Chris Lattner
7610c57d4b
remove some completely wrong code. 1 is never < 16. It turns out that GCC appears to put strings of any length into the ELF cstring equivalent, so just rip out the code.
...
llvm-svn: 77429
2009-07-29 04:54:38 +00:00
Daniel Dunbar
af71a3035b
Revert r77397, it causes significant regressions in llc performance.
...
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
Evan Cheng
c6d70ae063
Optimize Thumb2 jumptable to use tbb / tbh when all the offsets fit in byte / halfword.
...
llvm-svn: 77422
2009-07-29 02:18:14 +00:00
Eric Christopher
99f5534296
Fix comment.
...
llvm-svn: 77415
2009-07-29 01:01:19 +00:00
Bill Wendling
bef0437d61
Change the "PreferredEHDataFormat" from "absptr" if we're on a Darwin system >
...
Leopard.
llvm-svn: 77414
2009-07-29 00:59:34 +00:00
Bill Wendling
2cf001479c
Move comment to above method.
...
llvm-svn: 77412
2009-07-29 00:50:05 +00:00
Devang Patel
be62697e6b
Parse named metadata.
...
llvm-svn: 77410
2009-07-29 00:34:02 +00:00
Devang Patel
05a26fb6dd
Add NamedMDNode.
...
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Bill Wendling
b67440efb8
- Temporarily unbreak the build by forcing the TType "absptr", which isn't
...
correct. But what are you going to do? I'll fix this in the future.
- Move another large loop into its own method.
llvm-svn: 77408
2009-07-29 00:31:35 +00:00
Eric Christopher
f7802a33ce
Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. Lower
...
to ptest instruction plus setcc. Revamp ptest instruction. Add test.
llvm-svn: 77407
2009-07-29 00:28:05 +00:00
Dan Gohman
4723c103e3
Remove another F_OK.
...
llvm-svn: 77405
2009-07-29 00:02:58 +00:00
Daniel Dunbar
0033199c50
Match X86 register names to number.
...
llvm-svn: 77404
2009-07-29 00:02:19 +00:00
David Goodwin
0830980141
Thumb-2: fix typo that caused incorrect stack elimination for VFP operations and very large stack frames.
...
llvm-svn: 77401
2009-07-28 23:52:33 +00:00
Bill Wendling
23b177e86e
Cleanup code to use iterators instead of ".size()".
...
Does any one else hate the name "const_reverse_iterator" as much as I do?
llvm-svn: 77399
2009-07-28 23:44:43 +00:00
David Greene
5f6511c3d5
Improve performance of PadToColumn by eliminating flushes.
...
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
Dan Gohman
0c96daabad
On "Unix", if Program::FindProgramByName is given a name containing
...
slashes, just go with it, regardless of whether it looks like it will
be executable. This follows the behavior of sh(1) more closely.
llvm-svn: 77396
2009-07-28 23:25:18 +00:00
Bill Wendling
6c574d883c
Doxygenify comments.
...
llvm-svn: 77394
2009-07-28 23:23:00 +00:00
Bill Wendling
1fddd873b4
Split out large loop into it's very own method. No intended functionality change.
...
llvm-svn: 77393
2009-07-28 23:22:13 +00:00
Dan Gohman
367006523a
It isn't necessary to use F_OK when using R_OK or similar.
...
llvm-svn: 77392
2009-07-28 23:22:01 +00:00
Daniel Dunbar
e1fdb0e8ce
Move X86 instruction parsing into X86/AsmParser.
...
llvm-svn: 77384
2009-07-28 22:40:46 +00:00
Bill Wendling
15349f81fb
Output the EH TType format and base offset only if there are types that we're
...
going to emit.
llvm-svn: 77382
2009-07-28 22:23:45 +00:00
Benjamin Kramer
6adb6e07ce
Fix a fixme; don't take binaries from the working directory.
...
This fixes clang on non-darwin platforms if a file called 'ld' or 'as'
is in the working directory. Based on patch by Pawel Worach!
llvm-svn: 77379
2009-07-28 22:08:15 +00:00
Devang Patel
f869caa03f
Remove unused method.
...
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Bill Wendling
26cf1e3baf
Output the correct format for Darwin.
...
llvm-svn: 77376
2009-07-28 22:03:50 +00:00
Bill Wendling
5196c9c7c9
Use the preferred EH data format for the preferred EH data format.
...
llvm-svn: 77373
2009-07-28 21:54:03 +00:00
Bill Wendling
403990ad58
Darwin outputs (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) when we're
...
dealing with Data.
llvm-svn: 77372
2009-07-28 21:53:17 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Evan Cheng
4a04041056
Fix a typo.
...
llvm-svn: 77369
2009-07-28 21:49:18 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Evan Cheng
c8bed03349
In thumb2 mode, add pc is unpredictable. Use add + mov pc instead (that is until more optimization goes in).
...
llvm-svn: 77364
2009-07-28 20:53:24 +00:00
David Goodwin
68bb69d6e3
Remove support for ORN to workaround <rdar://problem/7096522>.
...
llvm-svn: 77363
2009-07-28 20:51:25 +00:00
Daniel Dunbar
f59ee96a16
Provide generic MCAsmParser when constructing target specific parsers.
...
llvm-svn: 77362
2009-07-28 20:47:52 +00:00
Devang Patel
1da7555a28
Add DebugInfoEnumerator to collect debug info.
...
llvm-svn: 77360
2009-07-28 19:55:13 +00:00
Andreas Bolka
f1bd1edc11
Simplify LDA-internal interface.
...
llvm-svn: 77359
2009-07-28 19:50:13 +00:00
Andreas Bolka
44623bb9b2
Add LDA statistics.
...
llvm-svn: 77358
2009-07-28 19:49:49 +00:00
Andreas Bolka
0e263ce8af
Minor factoring, naming and formatting cleanups.
...
llvm-svn: 77357
2009-07-28 19:49:25 +00:00
Bruno Cardoso Lopes
c6c5dbd5b8
Handle null and file symbol on doInitialization
...
llvm-svn: 77354
2009-07-28 19:25:33 +00:00
Chris Lattner
d6b4b29706
more simplifications and cleanup. :)
...
llvm-svn: 77350
2009-07-28 18:48:43 +00:00
Owen Anderson
c2c7932c64
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
David Goodwin
865c6298d7
Add workaround for <rdar://problem/7098328>.
...
llvm-svn: 77340
2009-07-28 18:15:38 +00:00
Daniel Dunbar
6d1e79dded
Expose Tokens to target specific assembly parsers.
...
llvm-svn: 77337
2009-07-28 17:58:44 +00:00
Chris Lattner
513a36b63d
Fix PR4639, a ELF-TLS regression from some of my refactoring.
...
llvm-svn: 77336
2009-07-28 17:57:51 +00:00
Chris Lattner
a3242e93b7
the apple "ld_classic" linker doesn't support .literal16 in 32-bit
...
mode, and "ld64" (the default linker) falls back to it in -static
mode.
llvm-svn: 77334
2009-07-28 17:50:28 +00:00
David Goodwin
e82862e24e
Add Thumb-2 patterns for ARMsrl_flag and ARMsra_flag.
...
llvm-svn: 77329
2009-07-28 17:06:49 +00:00
David Greene
71ab2fdddd
Add reload and remat backscheduling. This is disabled by default. Use
...
-schedule-spills=true to enable.
llvm-svn: 77327
2009-07-28 16:49:24 +00:00
Chris Lattner
795b63fb65
fix unused variable warning
...
llvm-svn: 77326
2009-07-28 16:49:19 +00:00
Evan Cheng
12da273f90
tADDrSPI doesn't have a predicate operand, but tADDhirr and tADDi3 have.
...
llvm-svn: 77305
2009-07-28 07:38:35 +00:00
Evan Cheng
73a5119675
Code clean up. No functionality changes.
...
llvm-svn: 77301
2009-07-28 06:24:12 +00:00
Evan Cheng
780748d565
- More refactoring. This gets rid of all of the getOpcode calls.
...
- This change also makes it possible to switch between ARM / Thumb on a
per-function basis.
- Fixed thumb2 routine which expand reg + arbitrary immediate. It was using
using ARM so_imm logic.
- Use movw and movt to do reg + imm when profitable.
- Other code clean ups and minor optimizations.
llvm-svn: 77300
2009-07-28 05:48:47 +00:00
Chris Lattner
e1a70c964f
fix a casting problem on the llvm-x86_64-linux tester
...
llvm-svn: 77295
2009-07-28 03:20:34 +00:00
Chris Lattner
5e693ed07b
Rip all of the global variable lowering logic out of TargetAsmInfo. Since
...
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.
Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.
This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
CStringSection_. Factor the code better.
5. fixes some bugs in string lowering on ELF targets.
llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Chris Lattner
697150ec0c
don't copy TargetLowering.
...
llvm-svn: 77293
2009-07-28 03:05:40 +00:00
Dan Gohman
31a9b9880b
Teach instcombine to respect and preserve inbounds. Add inbounds
...
to a few tests where it is required for the expected transformation.
llvm-svn: 77290
2009-07-28 01:40:03 +00:00
Mike Stump
38a579fe5a
Fix a small little typo.
...
llvm-svn: 77289
2009-07-28 01:35:34 +00:00
Dan Gohman
9ba43abc70
Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
...
llvm-svn: 77286
2009-07-28 00:37:50 +00:00
Dan Gohman
a3dcff5900
Grab the LLVMContext and parent Module of SI ahead of the
...
point where SI can get deleted. This fixes a use of free'd memory.
This fixes Externals/Povray.
llvm-svn: 77285
2009-07-28 00:37:06 +00:00
David Goodwin
57b51d9f82
ORN does not require (and can not have) the ".w" suffix. "Orthogonality" is a dirty word at ARM.
...
llvm-svn: 77275
2009-07-27 23:34:12 +00:00
Mike Stump
4798763e14
Fix a release-asserts warning. Debug functions should be marked used,
...
if there are no other uses. If people don't need this routine
anymore, if should be deleted.
llvm-svn: 77274
2009-07-27 23:33:34 +00:00
Daniel Dunbar
eb6bb32bef
llvm-mc: Implement .abort fully in the front end
...
llvm-svn: 77272
2009-07-27 23:20:52 +00:00
Mike Stump
d934cc06c6
Avoid build warnings.
...
llvm-svn: 77271
2009-07-27 23:14:11 +00:00
Owen Anderson
45308b578b
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
75b7f678a3
Add a comment about the "getelementptr null" trick.
...
llvm-svn: 77262
2009-07-27 21:59:50 +00:00
Dan Gohman
1639c3905e
Add a new keyword 'inbounds' for use with getelementptr. See the
...
LangRef.html changes for details.
llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Daniel Dunbar
52d03b252e
llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
...
- My DFS traversal of LLVM is, at least for now, nearly complete! :)
llvm-svn: 77258
2009-07-27 21:49:56 +00:00
Daniel Dunbar
ae15479eb3
Unbreak build.
...
llvm-svn: 77256
2009-07-27 21:47:07 +00:00
Dan Gohman
4b66b47a7c
Make raw_null_ostream flush its buffer in its destructor, so that
...
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.
llvm-svn: 77255
2009-07-27 21:46:02 +00:00
Chris Lattner
9d0e762c81
hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
...
MCSections soon instead of Section for all targets, and we need something to
own them.
llvm-svn: 77252
2009-07-27 21:28:04 +00:00
Daniel Dunbar
a87555aaa8
Move MCContext and friends to StringRef based APIs.
...
llvm-svn: 77251
2009-07-27 21:22:30 +00:00
Owen Anderson
69c464dec4
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Dan Gohman
1b763293a6
Add an assertion check to raw_ostream's destructor to verify
...
that the subclass hasn't left any pending data in the buffer.
llvm-svn: 77245
2009-07-27 20:49:44 +00:00
David Goodwin
e5b969f6a6
Remove TPat. No patterns depend on just isThumb(). Must use either T1Pat (isThumb1Only()) or T2Pat (is Thumb2).
...
llvm-svn: 77242
2009-07-27 19:59:26 +00:00
Bruno Cardoso Lopes
038e6efdda
fix comment
...
llvm-svn: 77239
2009-07-27 19:38:38 +00:00
Bruno Cardoso Lopes
16c5b4fca8
add module identifier to the elf object file
...
llvm-svn: 77238
2009-07-27 19:32:57 +00:00
Chris Lattner
e7cb8f7987
Sink getSectionPrefixForUniqueGlobal down into the TAI
...
implementations that need it, rearrange ELFTAI.
llvm-svn: 77236
2009-07-27 19:14:14 +00:00
Chris Lattner
375a01c34a
remove dead code.
...
llvm-svn: 77233
2009-07-27 19:00:33 +00:00
Bruno Cardoso Lopes
cb364ab3f2
Handle external symbols for ELF and add some static methods to ELFSym
...
llvm-svn: 77232
2009-07-27 18:54:47 +00:00
Evan Cheng
38b7eee164
More DCE.
...
llvm-svn: 77231
2009-07-27 18:48:45 +00:00
Evan Cheng
0e075e2429
convertToThreeAddress can't handle Thumb2 instructions (which don't have same address mode as ARM instructions).
...
llvm-svn: 77230
2009-07-27 18:44:00 +00:00
Devang Patel
072833539b
Initialize mdnNext.
...
llvm-svn: 77229
2009-07-27 18:42:56 +00:00
Evan Cheng
18688f431d
Get rid of more dead code.
...
llvm-svn: 77227
2009-07-27 18:38:54 +00:00
Evan Cheng
239ed4b343
Cosmetic change.
...
llvm-svn: 77222
2009-07-27 18:31:40 +00:00
Evan Cheng
8f2ed1bc5a
Clean up.
...
llvm-svn: 77221
2009-07-27 18:25:24 +00:00
Evan Cheng
056c669e93
Get rid of some more getOpcode calls.
...
This also fixes potential problems in ARMBaseInstrInfo routines not recognizing thumb1 instructions when 32-bit and 16-bit instructions mix.
llvm-svn: 77218
2009-07-27 18:20:05 +00:00
Mike Stump
447a8f29ef
Fix build.
...
llvm-svn: 77217
2009-07-27 18:18:30 +00:00
Sanjiv Gupta
96b3d4a2f9
Remove duplicate entries while printing decls for external symbols.
...
Some libcall names are same, so they were getting printed twice.
llvm-svn: 77215
2009-07-27 18:04:34 +00:00
Douglas Gregor
c0137150ee
CMake: make sure that the *.inc files for libSystem show up in the resulting
...
project.
llvm-svn: 77213
2009-07-27 17:55:55 +00:00
Chris Lattner
e48c85fa8b
add an explanatory comment about why we drop these in readonly and
...
not in mergable
llvm-svn: 77210
2009-07-27 17:39:40 +00:00
Devang Patel
de6f46c32e
Do not seed mstadata into the value map.
...
llvm-svn: 77208
2009-07-27 17:17:04 +00:00
Chris Lattner
1814e81e17
make COFF work like ELF and macho, by splitting out into its own
...
header even though there is only one COFF target.
llvm-svn: 77204
2009-07-27 16:45:59 +00:00
Chris Lattner
ff1f401f9b
don't create default text/data sections for all targets.
...
llvm-svn: 77203
2009-07-27 16:44:04 +00:00
Chris Lattner
e25817a138
Apparently alpha doesn't use ElfTargetAsmInfo (?)
...
llvm-svn: 77202
2009-07-27 16:42:14 +00:00
David Goodwin
007031d1b4
Thumb-2 does not have RSC.
...
llvm-svn: 77201
2009-07-27 16:39:05 +00:00
David Goodwin
782f242fd7
Add ".w" suffix for wide thumb-2 instructions.
...
llvm-svn: 77199
2009-07-27 16:31:55 +00:00
Chris Lattner
543c83e8f2
inline a method.
...
llvm-svn: 77198
2009-07-27 16:27:32 +00:00
Chris Lattner
3679ad5a77
apparently we have "windows" and "coff", which are different(?)
...
llvm-svn: 77197
2009-07-27 16:22:39 +00:00