Daniel Dunbar
dda1b60b4b
Don't use llvm_report_error in libSystem, this is a layering violation.
...
llvm-svn: 77169
2009-07-26 21:16:42 +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
Evan Cheng
d555fec28c
Refactor. Get rid of a few more getOpcode() calls.
...
llvm-svn: 77164
2009-07-26 18:55:14 +00:00
Chris Lattner
12e2f1ca42
reduce indentation
...
llvm-svn: 77161
2009-07-26 18:08:15 +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
Sanjiv Gupta
cc8eb579b9
Fix the breakage caused by 76950.
...
PIC16 has special naming conventions for variables having section names specified via section attribute.
llvm-svn: 77153
2009-07-26 10:25:01 +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
d0f5c0b334
Make sure getName().data() is always null terminated.
...
llvm-svn: 77149
2009-07-26 09:22:02 +00:00
Daniel Dunbar
64abfd0337
Remove Value::getNameLen
...
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Nick Lewycky
c130e8eae9
Move MSILModule and MSILWriter into the 'llvm' namespace, instead of the 'MSIL'
...
namespace which could very well conflict with non-LLVM code.
Also clean up some spacing, remove an extra header.
llvm-svn: 77146
2009-07-26 08:16:51 +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
090aa4b8f4
simplify SectionFlagsForGlobal, even though I want to kill it.
...
llvm-svn: 77143
2009-07-26 07:17:39 +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
dfd1014214
simplify this code now that SectionKind knows if a global is weak or not.
...
llvm-svn: 77141
2009-07-26 07:07:01 +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
950bd8ba10
two files I missed in the last commit.
...
llvm-svn: 77137
2009-07-26 06:36:20 +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
736f3d6eb5
improve the default impl of getSectionForMergableConstant by
...
putting readonly constants in the readonly section if we have one.
llvm-svn: 77131
2009-07-26 05:57:07 +00:00
Chris Lattner
e795c027fd
make elf targets correctly handle constant pool entries that require relocations.
...
llvm-svn: 77130
2009-07-26 05:55:20 +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
4311f3025b
Update target registration description in Writing An LLVM Backend, and add
...
a mention in release notes.
llvm-svn: 77128
2009-07-26 05:41:39 +00:00
Daniel Dunbar
fe859a94dc
Sort list of targets in --version.
...
llvm-svn: 77127
2009-07-26 05:09:50 +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
Daniel Dunbar
6b705e3a64
Update for API change.
...
llvm-svn: 77124
2009-07-26 04:23:03 +00:00
Chris Lattner
809a525ffa
fix isReadOnly predicate to not include data that has to be
...
writable because of teh dynamic linker.
llvm-svn: 77122
2009-07-26 04:18:10 +00:00
Chris Lattner
f67024bb1c
remove a dead enum case.
...
llvm-svn: 77121
2009-07-26 04:09:02 +00:00
Daniel Dunbar
5a9d56ab90
Update Triple to use StringRef/Twine based APIs.
...
- This is now shorter, simpler, safer, and more efficient, what a deal.
llvm-svn: 77119
2009-07-26 03:31:47 +00:00
Daniel Dunbar
b97f9fc3f5
Add StringRef::{slice, split}, two convenient string operations which are simple
...
and efficient on a StringRef.
llvm-svn: 77117
2009-07-26 03:18:15 +00:00
Chris Lattner
5547fd80ad
put normal data into .data instead of .data.rel on elf systems.
...
llvm-svn: 77116
2009-07-26 03:06:11 +00:00
Daniel Dunbar
7917e05213
Remove unused header
...
llvm-svn: 77115
2009-07-26 02:23:52 +00:00
Daniel Dunbar
49987490c2
Kill Target specific ModuleMatchQuality stuff.
...
- This was overkill and inconsistently implemented.
llvm-svn: 77114
2009-07-26 02:22:58 +00:00
Daniel Dunbar
62e74f03c7
Add TargetRegistry::lookupTarget.
...
- This is a simplified mechanism which just looks up a target based on the
target triple, with a few additional flags.
- Remove getClosestStaticTargetForModule, the moral equivalent is now:
lookupTarget(Mod->getTargetTriple, true, false, ...);
- This no longer does the fuzzy matching with target data (based on endianness
and pointer width) that getClosestStaticTargetForModule was doing, but this
was deemed unnecessary.
llvm-svn: 77111
2009-07-26 02:12:58 +00:00
Chris Lattner
32fefa61d9
eliminate a pointless switch stmt.
...
llvm-svn: 77110
2009-07-26 01:44:55 +00:00
Chris Lattner
9cd489c7f1
finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
...
for now. Make the section switching directives more consistent
by not including \n and including \t for them all.
llvm-svn: 77107
2009-07-26 01:24:18 +00:00
Daniel Dunbar
3c3f0d5b63
Some clients rely on getName{Start,End} not returning 0, even if the length is
...
0.
- I could have swore the prev change went through a make check cycle...
llvm-svn: 77106
2009-07-26 01:04:10 +00:00
Daniel Dunbar
518cd20f61
Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
...
llvm-svn: 77105
2009-07-26 00:51:56 +00:00
Chris Lattner
b95150b65a
simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bit
...
and make it more aggressive, we now put:
const int G2 __attribute__((weak)) = 42;
into the text (readonly) segment like gcc, previously we put
it into the data (readwrite) segment.
llvm-svn: 77104
2009-07-26 00:51:36 +00:00
Chris Lattner
259c4e4a55
simplify some predicates, add isMergableString()
...
llvm-svn: 77103
2009-07-26 00:50:43 +00:00
Daniel Dunbar
ddf2470263
Simplify.
...
llvm-svn: 77102
2009-07-26 00:42:33 +00:00
Bob Wilson
ec256c8938
Add support for ARM Neon VREV instructions.
...
Patch by Anton Korzh, with some modifications from me.
llvm-svn: 77101
2009-07-26 00:39:34 +00:00
Daniel Dunbar
3e85b410ab
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Daniel Dunbar
c1ab70760a
Remove Value::setName(const char*).
...
- Split into a separate patch because there is a slight functionality change,
it is no longer valid to call setName(0), which was equivalent to
setName(""). I'm hoping no one depends on this...
llvm-svn: 77099
2009-07-26 00:17:14 +00:00
Daniel Dunbar
038a7f0d35
Remove Value::{isName, getNameRef}.
...
Also, change MDString to use a StringRef.
llvm-svn: 77098
2009-07-25 23:55:21 +00:00