1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

49406 Commits

Author SHA1 Message Date
Chris Lattner
ec951ca82f fix a casting problem on the llvm-x86_64-linux tester
llvm-svn: 77295
2009-07-28 03:20:34 +00:00
Chris Lattner
55461787cc 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
2aed301c12 don't copy TargetLowering.
llvm-svn: 77293
2009-07-28 03:05:40 +00:00
Daniel Dunbar
f7ad1ea8dd llvm-mc: Factor AsmToken class out of AsmLexer.
llvm-svn: 77292
2009-07-28 03:00:54 +00:00
Dan Gohman
0d0dd7b732 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
8902846c69 Fix a small little typo.
llvm-svn: 77289
2009-07-28 01:35:34 +00:00
Daniel Dunbar
9e627e8dc8 llvm-mc: Stop uniqueing string tokens, nothing actually uses this.
llvm-svn: 77287
2009-07-28 00:58:50 +00:00
Dan Gohman
11eb2ee32c Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
llvm-svn: 77286
2009-07-28 00:37:50 +00:00
Dan Gohman
361e911b89 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
0bcb94eeff 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
6cc3ea28df 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
Dan Gohman
839f148e82 Pass true to the Internalize parameter of createStandardLTOPasses,
to match llvm-ld's default behavior.

llvm-svn: 77273
2009-07-27 23:23:47 +00:00
Daniel Dunbar
3edfc4bb16 llvm-mc: Implement .abort fully in the front end
llvm-svn: 77272
2009-07-27 23:20:52 +00:00
Mike Stump
be4029ff76 Avoid build warnings.
llvm-svn: 77271
2009-07-27 23:14:11 +00:00
Daniel Dunbar
67ac64c7b1 Add a comment on Value explaining the current getName() behavior.
llvm-svn: 77269
2009-07-27 22:39:14 +00:00
Owen Anderson
d729f993b8 Move ConstantStruct back to 2.5 API.
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
1e723730cb Add a comment about the "getelementptr null" trick.
llvm-svn: 77262
2009-07-27 21:59:50 +00:00
Dan Gohman
ab9087e845 Add inbounds to the polygen grammar.
llvm-svn: 77261
2009-07-27 21:55:32 +00:00
Dan Gohman
b8e8e75942 vim syntax highlighting for inbounds keyword.
llvm-svn: 77260
2009-07-27 21:54:51 +00:00
Dan Gohman
490eb36e1d 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
5f73e9d3f8 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
Dan Gohman
daf5eafa6a Order unsigned before signed, for consistency.
llvm-svn: 77257
2009-07-27 21:49:34 +00:00
Daniel Dunbar
89c8a88449 Unbreak build.
llvm-svn: 77256
2009-07-27 21:47:07 +00:00
Dan Gohman
40bd748448 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
d519223908 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
6de68a2544 Move MCContext and friends to StringRef based APIs.
llvm-svn: 77251
2009-07-27 21:22:30 +00:00
Chris Lattner
923a453dea simplify #includes.
llvm-svn: 77250
2009-07-27 21:13:35 +00:00
Owen Anderson
256c2c250e Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Dan Gohman
982c2fe893 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
Andreas Bolka
0cb4ca7575 Fix typo.
llvm-svn: 77244
2009-07-27 20:37:10 +00:00
Devang Patel
1706411e39 80 columns!
llvm-svn: 77243
2009-07-27 20:30:05 +00:00
David Goodwin
6ff3fd8021 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
Sean Callanan
3b5de0fa36 Thanks, Bill!
llvm-svn: 77240
2009-07-27 19:45:28 +00:00
Bruno Cardoso Lopes
acb73d4897 fix comment
llvm-svn: 77239
2009-07-27 19:38:38 +00:00
Bruno Cardoso Lopes
f6ea9fb8c2 add module identifier to the elf object file
llvm-svn: 77238
2009-07-27 19:32:57 +00:00
Chris Lattner
674e5fa434 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
4ff7e1300f remove dead code.
llvm-svn: 77233
2009-07-27 19:00:33 +00:00
Bruno Cardoso Lopes
a536302ed5 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
718ab76a04 More DCE.
llvm-svn: 77231
2009-07-27 18:48:45 +00:00
Evan Cheng
a702481089 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
579ccbe163 Initialize mdnNext.
llvm-svn: 77229
2009-07-27 18:42:56 +00:00
Evan Cheng
fa630cca3f Get rid of more dead code.
llvm-svn: 77227
2009-07-27 18:38:54 +00:00
Sean Callanan
34d4b90554 Many of Daniel's fixes.
I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.

I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface.  This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom 
readBytes().

llvm-svn: 77225
2009-07-27 18:33:24 +00:00
Evan Cheng
55e369a447 Cosmetic change.
llvm-svn: 77222
2009-07-27 18:31:40 +00:00
Evan Cheng
03307125f5 Clean up.
llvm-svn: 77221
2009-07-27 18:25:24 +00:00
Douglas Gregor
ea200f4d3a CMake configuration: find mkdtemp, mkstemp, mktemp.
llvm-svn: 77219
2009-07-27 18:23:41 +00:00
Evan Cheng
a773ae7a39 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
ddec2c6c95 Fix build.
llvm-svn: 77217
2009-07-27 18:18:30 +00:00
Dan Gohman
40927be3bf Following discussion on llvm-dev ("proposed new rule for getelementptr"),
add a new "Pointer Aliasing Rules" section.

llvm-svn: 77216
2009-07-27 18:07:55 +00:00
Sanjiv Gupta
aec8e8ce73 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