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

49295 Commits

Author SHA1 Message Date
Sanjiv Gupta
f39c96217b Test case to check that separate section is created for a global variable specified with section attribute.
llvm-svn: 77195
2009-07-27 16:20:41 +00:00
Dan Gohman
39c0d3b10a Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.

llvm-svn: 77194
2009-07-27 16:11:46 +00:00
Dan Gohman
e999569f50 Fix wording in comments.
llvm-svn: 77193
2009-07-27 16:09:48 +00:00
Chris Lattner
19c9914343 update testcase.
llvm-svn: 77192
2009-07-27 15:52:58 +00:00
Chris Lattner
255675d8b2 32-bit darwin targets support .literal16 too.
llvm-svn: 77191
2009-07-27 15:44:04 +00:00
Benjamin Kramer
6e3704568e Remove trailing slashes from include paths. Some versions of mingw don't like them.
llvm-svn: 77188
2009-07-27 09:39:18 +00:00
Benjamin Kramer
706c0b2b97 Test commit: fix typo
llvm-svn: 77187
2009-07-27 09:06:52 +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
Evan Cheng
657ef082f0 If CPSR is modified but the def is dead, then it's ok to fold the load / store.
llvm-svn: 77182
2009-07-27 04:18:04 +00:00
Evan Cheng
674c4d47b9 Use t2LDRi12 and t2STRi12 to load / store to / from stack frames. Eliminate more getOpcode calls.
llvm-svn: 77181
2009-07-27 03:14:20 +00:00
Sanjiv Gupta
efd89b69e1 Generate a libcall for i8 multiply.
llvm-svn: 77179
2009-07-27 02:44:46 +00:00
Sanjiv Gupta
c1b29cb551 fixed incorrect lowering of ISD::SUB node. SUB has only one result value.
It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now. 

llvm-svn: 77178
2009-07-27 02:26:06 +00:00
Evan Cheng
0cdbde1adf Use the right instructions to copy between GPR and the more strictive tGPR classes. t2MOV does not match the RC requirements.
llvm-svn: 77175
2009-07-27 00:33:08 +00:00
Evan Cheng
61765ac517 Merge isLoadFromStackSlot into one since it behaves the same regardless of sub-target.
llvm-svn: 77174
2009-07-27 00:24:36 +00:00
Evan Cheng
b1ab426733 Just use a single isMoveInstr to catch all the cases.
llvm-svn: 77173
2009-07-27 00:05:15 +00:00
Evan Cheng
a6737e21cf Rename tMOVhi2lor to tMOVgpr2tgpr. It's not moving from a high register to a low register. It's moving from a GPR register class to a more restrictive tGPR class. Also change tMOVlor2hir, and tMOVhir2hir.
llvm-svn: 77172
2009-07-26 23:59:01 +00:00
Eli Friedman
8008283cf9 Reorganize code a bit to reduce indentation. No visible functionality
change.

llvm-svn: 77171
2009-07-26 23:47:17 +00:00
Nick Lewycky
4e4475ce49 Fix libLTO:
* Call InitializeAllTargets on every path where we might query the
   TargetRegistry. This fixes PR4604.
 * flush the formatted_raw_ostream& or else not all of the assembly will make
   it to the .s file. (It doesn't do this in its destructor?!)
 * Due to a reversed conditional, libLTO was reporting many symbols as both
   defined and undefined, including two definitions of the same symbol name
   in its symbol list.

llvm-svn: 77170
2009-07-26 22:16:39 +00:00
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