1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

9300 Commits

Author SHA1 Message Date
Devang Patel
b784b514a3 Remove unused method.
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Bill Wendling
3a7a0da82d Remove unused parameter name.
llvm-svn: 77371
2009-07-28 21:50:32 +00:00
Devang Patel
cb23671431 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
Owen Anderson
390e9778d4 Return ConstantVector to 2.5 API.
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Daniel Dunbar
d0d6b26e87 Provide generic MCAsmParser when constructing target specific parsers.
llvm-svn: 77362
2009-07-28 20:47:52 +00:00
Devang Patel
5aba07663b Add DebugInfoEnumerator to collect debug info.
llvm-svn: 77360
2009-07-28 19:55:13 +00:00
Andreas Bolka
415bdb47a8 Simplify LDA-internal interface.
llvm-svn: 77359
2009-07-28 19:50:13 +00:00
Owen Anderson
aa8c94b051 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Daniel Dunbar
6e2f7db6b6 Expose Tokens to target specific assembly parsers.
llvm-svn: 77337
2009-07-28 17:58:44 +00:00
Chris Lattner
c74586940a 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
Stefanus Du Toit
591ef9fa8c Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
Fixes MSVC build of LiveInterval.cpp.

Patch by Nicolas Capens.

llvm-svn: 77317
2009-07-28 13:41:07 +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
Daniel Dunbar
3edfc4bb16 llvm-mc: Implement .abort fully in the front end
llvm-svn: 77272
2009-07-27 23:20:52 +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
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
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
Devang Patel
1706411e39 80 columns!
llvm-svn: 77243
2009-07-27 20:30:05 +00:00
Sean Callanan
3b5de0fa36 Thanks, Bill!
llvm-svn: 77240
2009-07-27 19:45:28 +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
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
Douglas Gregor
ea200f4d3a CMake configuration: find mkdtemp, mkstemp, mktemp.
llvm-svn: 77219
2009-07-27 18:23:41 +00:00
Chris Lattner
12c25bacbd 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
062cc18e39 inline a method.
llvm-svn: 77198
2009-07-27 16:27:32 +00:00
Dan Gohman
e999569f50 Fix wording in comments.
llvm-svn: 77193
2009-07-27 16:09:48 +00:00
Chris Lattner
cd7d963b75 Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.

llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Chris Lattner
a2b00bdd7a Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.

llvm-svn: 77184
2009-07-27 05:32:16 +00:00
Chris Lattner
0f4d60ca90 untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
'unnamed' bss section, but some impls would want a named one.  Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.

llvm-svn: 77165
2009-07-26 19:23:28 +00:00
Chris Lattner
8e840e942e Use the RHS length instead of the LHS length. They are both the same,
but this ends up compiling code like this:

int foo(const StringRef &R) {
  return R == "food";
}

to use a constant sized memcmp instead of a variable memcmp.

llvm-svn: 77160
2009-07-26 17:46:03 +00:00
Daniel Dunbar
4a36d5dcfd Remove Value::getName{Start,End}, the last of the old Name APIs.
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Daniel Dunbar
64abfd0337 Remove Value::getNameLen
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Daniel Dunbar
75a66c519b Eliminate some uses of DOUT, cerr, and getNameStart().
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Chris Lattner
9104e8d808 remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
just use a smallstring instead.

llvm-svn: 77144
2009-07-26 07:33:58 +00:00
Chris Lattner
b508741de0 make SectionKind keep track of whether a global had an explicit
section specified for it or not.

llvm-svn: 77142
2009-07-26 07:14:28 +00:00
Chris Lattner
41570cf306 make SectionKind know whether a symbol is weak or not in addition
to its classification.

llvm-svn: 77140
2009-07-26 07:00:12 +00:00
Chris Lattner
71546b5147 Make the kind actually be private.
llvm-svn: 77139
2009-07-26 06:51:27 +00:00
Chris Lattner
61e4445f5a rename Mergable -> Mergeable and Writable -> Writeable
llvm-svn: 77138
2009-07-26 06:48:26 +00:00
Chris Lattner
e2a16438a6 remove a bunch of helper functions, just use SectionKind::get instead.
llvm-svn: 77135
2009-07-26 06:34:33 +00:00
Chris Lattner
1f709a74f6 simplify getSectionForMergableConstant to take a SectionKind.
llvm-svn: 77134
2009-07-26 06:26:55 +00:00
Chris Lattner
d44b68fbeb precreate 4/8/16 byte mergable sections to simplify code.
llvm-svn: 77133
2009-07-26 06:16:11 +00:00
Chris Lattner
e8b2f94ce2 introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
simplify targets.

llvm-svn: 77132
2009-07-26 06:11:33 +00:00
Chris Lattner
b3d6d59c10 Rearrange all the SectionKinds and structure them into a hierarchical
group instead of a bunch of random unrelated ideas.  Provide predicates
to categorize a SectionKind into a group, and use them instead of 
getKind() throughout the code.

This also renames a ton of SectionKinds to be more consistent and
evocative, and adds a huge number of comments on the enums so that
I will hopefully be able to remember how this stuff works long from
now.

llvm-svn: 77129
2009-07-26 05:44:20 +00:00
Daniel Dunbar
a7a01acc7c Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over.

llvm-svn: 77126
2009-07-26 05:03:33 +00:00
Daniel Dunbar
1c59fa86e2 Oops, forgot XCore. Sorry XCore!
llvm-svn: 77125
2009-07-26 04:52:45 +00:00