Commit Graph

64174 Commits

Author SHA1 Message Date
Douglas Gregor d612997e73 When instantiating a variable without an initializer, call
ActOnUninitializedDecl.

llvm-svn: 77211
2009-07-27 17:43:39 +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
Anders Carlsson cabdeb4932 Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.
llvm-svn: 77205
2009-07-27 17:10:54 +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
Chris Lattner c51f3394f3 sink text/data section creation down into the target-specific places that
should know about them.  PECoff doesn't share these, and I want all sections
to be created by object-file-specific code.

llvm-svn: 77196
2009-07-27 16:20:58 +00:00
Sanjiv Gupta a77a182b04 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 9c7f808201 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 169ef138e8 Fix wording in comments.
llvm-svn: 77193
2009-07-27 16:09:48 +00:00
Chris Lattner 57af4ece60 update testcase.
llvm-svn: 77192
2009-07-27 15:52:58 +00:00
Chris Lattner 469ae8ac54 32-bit darwin targets support .literal16 too.
llvm-svn: 77191
2009-07-27 15:44:04 +00:00
Anders Carlsson 72fb384a65 Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson b97a3ec4e7 Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.
llvm-svn: 77189
2009-07-27 14:55:54 +00:00
Benjamin Kramer 729749d34d 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 0f44237aef Test commit: fix typo
llvm-svn: 77187
2009-07-27 09:06:52 +00:00
Chris Lattner 86b7255776 Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.

llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Anders Carlsson b7130ed888 Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Chris Lattner 149465ea06 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 4ead0b9e1c add bugzilla #
llvm-svn: 77183
2009-07-27 04:49:58 +00:00
Evan Cheng 371ec9e810 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 c47e109335 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
Anders Carlsson bff6b49cd0 More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.
llvm-svn: 77180
2009-07-27 02:56:37 +00:00
Sanjiv Gupta c8885129d8 Generate a libcall for i8 multiply.
llvm-svn: 77179
2009-07-27 02:44:46 +00:00
Sanjiv Gupta e334b34bfd 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
Anders Carlsson ba4c6d1c91 More work on bitfield support in the new constant struct builder.
llvm-svn: 77177
2009-07-27 01:23:51 +00:00
Mike Stump 21e0f895a1 Fix PR4624.
llvm-svn: 77176
2009-07-27 00:44:23 +00:00
Evan Cheng 186332f898 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 0e5b149930 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 26b51b15ed Just use a single isMoveInstr to catch all the cases.
llvm-svn: 77173
2009-07-27 00:05:15 +00:00
Evan Cheng faede73a32 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 65919b5058 Reorganize code a bit to reduce indentation. No visible functionality
change.

llvm-svn: 77171
2009-07-26 23:47:17 +00:00
Nick Lewycky fd6a2498ab 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 bcd92f1bc4 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 602d44fa70 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 8953720f23 Refactor. Get rid of a few more getOpcode() calls.
llvm-svn: 77164
2009-07-26 18:55:14 +00:00
Chris Lattner 06ad4948f5 reduce indentation
llvm-svn: 77161
2009-07-26 18:08:15 +00:00
Chris Lattner e3c374ac33 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
Nuno Lopes bd2cd92907 fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end
llvm-svn: 77159
2009-07-26 16:36:45 +00:00
Nuno Lopes 0b797b1c9d add gentoo 2009.0 g++ header locations
llvm-svn: 77158
2009-07-26 16:14:05 +00:00
Sanjiv Gupta fc4d4994ee 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 6115b39ffd 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 e59313a298 Switch to getName()
llvm-svn: 77151
2009-07-26 09:28:40 +00:00
Daniel Dunbar 7cc8f7e86d Make sure getName().data() is always null terminated.
llvm-svn: 77149
2009-07-26 09:22:02 +00:00
Daniel Dunbar ca414c7cae Remove Value::getNameLen
llvm-svn: 77148
2009-07-26 08:34:35 +00:00