Commit Graph

68998 Commits

Author SHA1 Message Date
Mike Stump 017460ab6c Implement a FIXME. This improves codegen just a tad.
llvm-svn: 83221
2009-10-01 22:29:41 +00:00
David Goodwin 1cc6dd97da Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
llvm-svn: 83218
2009-10-01 22:19:57 +00:00
Fariborz Jahanian a0f91ad59c enumerator value of 0 is not a null pointer constant for
deciding const of null pointer conversion. Fixes PR5086.

llvm-svn: 83217
2009-10-01 22:10:15 +00:00
Mike Stump 70cb67fcf4 Expand api out in the usual inserter way, though, I do have a
question, can we get rid of the BasicBlock versions of all inserters
and use Head == 0 to indicate the old case when GetInsertBlock == 0?

llvm-svn: 83216
2009-10-01 22:08:58 +00:00
David Goodwin 9a051a5922 Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
llvm-svn: 83215
2009-10-01 21:46:35 +00:00
Evan Cheng 6f012d83f2 ARM::tPOP and tPOP_RET each has an extra writeback operand now.
llvm-svn: 83214
2009-10-01 20:54:53 +00:00
Jim Grosbach 7dbc2652b9 remove trailing whitespace
llvm-svn: 83213
2009-10-01 20:45:06 +00:00
Douglas Gregor 369acf9304 CodeGen may see out-of-line declarations of the various special member
functions when they are explicitly declared, e.g., via a function
template specialization or explicit template instantiation
declaration. Don't try to synthesize bodies for the special member
functions in this case; rather, check whether we have an implicit
declaration and, if so, synthesize the appropriate function
body. Fixes PR5084.

llvm-svn: 83212
2009-10-01 20:44:19 +00:00
Fariborz Jahanian b3c44f9ee9 Patch to implement static casting which requires one
user-defined type conversion. Fixes PR5040.

llvm-svn: 83211
2009-10-01 20:39:51 +00:00
Devang Patel 75cc16c0f2 Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
This is not yet enabled.

llvm-svn: 83210
2009-10-01 20:31:14 +00:00
Fariborz Jahanian e4b21aba44 Set __EXCEPTIONS by checking on darwin's triple.
Patch by Rafael Espindola.

llvm-svn: 83209
2009-10-01 20:30:46 +00:00
David Goodwin be3039e776 Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
llvm-svn: 83208
2009-10-01 19:45:32 +00:00
Devang Patel 787f94c28d Record first and last instruction of a scope in DbgScope.
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Dan Gohman 8cf7907ba4 Don't use identifiers that start with an underscore followed
by a capital letter, which invokes undefined behavior.

llvm-svn: 83206
2009-10-01 17:39:52 +00:00
Ted Kremenek 5c22e110a1 Fix bad grammar in static analyzer diagnostic. Reported by Robert Purves!
llvm-svn: 83204
2009-10-01 17:31:50 +00:00
Douglas Gregor f99626ed11 Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo
llvm-svn: 83203
2009-10-01 17:25:36 +00:00
Rafael Espindola 00a665751d Move the "needs exception support" logic to clang. This also fixes
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.

llvm-svn: 83199
2009-10-01 13:33:33 +00:00
Evan Cheng 4fb2891396 Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
operands of instructions with these properties while breaking anti-dep.

llvm-svn: 83198
2009-10-01 08:26:23 +00:00
Evan Cheng 1b2b64f618 Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
ld / st pairs, etc.

llvm-svn: 83197
2009-10-01 08:22:27 +00:00
Evan Cheng 46668e09be Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
set, these flags indicate the instructions source / def operands have special
register allocation requirement that are not captured in their register classes.
Post-allocation passes (e.g. post-alloc scheduler) should not change their
allocations. e.g. ARM::LDRD require the two definitions to be allocated
even / odd register pair.

llvm-svn: 83196
2009-10-01 08:21:18 +00:00
Douglas Gregor e364e7bc2b Fix a lame regression in IR gen for C++ delete expressions. PR5102
llvm-svn: 83195
2009-10-01 05:49:51 +00:00
Douglas Gregor d846fbf20d Remove GVNPRE.cpp from the CMake makefile
llvm-svn: 83194
2009-10-01 05:30:05 +00:00
Chris Lattner 5f3cc06cd2 remove the GVNPRE pass. It has been subsumed by the GVN pass.
Ok'd by Owen.

llvm-svn: 83193
2009-10-01 02:18:36 +00:00
Evan Cheng 4bcd523acb Update ARM JIT emitter to account for ld/st multiple changes.
llvm-svn: 83192
2009-10-01 01:39:21 +00:00
Evan Cheng 3bbc6c3ae6 Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.
llvm-svn: 83191
2009-10-01 01:33:39 +00:00
Devang Patel 34986f12e6 Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
llvm-svn: 83190
2009-10-01 01:15:28 +00:00
Devang Patel 4dbca6dfd4 If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Steve Naroff a6c56bb849 Add support for class and protocol references.
llvm-svn: 83186
2009-10-01 00:31:07 +00:00
Mike Stump 7d69911a1f A couple of refinements for laying out debug information for
BlockDeclRefDecls.

llvm-svn: 83185
2009-10-01 00:27:30 +00:00
John McCall 4fa5342758 Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.

llvm-svn: 83184
2009-10-01 00:25:31 +00:00
Devang Patel e0709cfc92 Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 

llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Devang Patel 3256c751f5 Use MDNode * directly as an RecordSourceLine() argument.
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Devang Patel 5c13c2d392 Remove dead code.
llvm-svn: 83181
2009-09-30 22:43:52 +00:00
Devang Patel a49be76f43 Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
llvm-svn: 83180
2009-09-30 22:34:41 +00:00
Bob Wilson b2120755a2 Use OutStreamer.SwitchSection instead of writing out textual section directives.
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.

llvm-svn: 83178
2009-09-30 22:25:37 +00:00
Douglas Gregor 42909754f6 Improve template argument deduction in the case where the parameter
type is a template-id (e.g., basic_ostream<CharT, Traits>) and the
argument type is a class that has a derived class matching the
parameter type. Previously, we were giving up on template argument
deduction too early.

llvm-svn: 83177
2009-09-30 22:13:51 +00:00
Bob Wilson b633d7a665 Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
to emit target-specific things at the beginning of the asm output.  This
fixes a problem for PPC, where the text sections are not being kept together
as expected.  The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives.  The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text.  With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.

llvm-svn: 83176
2009-09-30 22:06:26 +00:00
Douglas Gregor 66950a32d9 When overload resolution fails for an overloaded operator, show the
overload candidates (but not the built-in ones). We still rely on the
underlying built-in semantic analysis to produce the initial
diagnostic, then print the candidates following that diagnostic. 

One side advantage of this approach is that we can perform more validation
of C++'s operator overloading with built-in candidates vs. the
semantic analysis for those built-in operators: when there are no
viable candidates, we know to expect an error from the built-in
operator handling code. Otherwise, we are not modeling the built-in
semantics properly within operator overloading. This is checked as:

      assert(Result.isInvalid() && 
             "C++ binary operator overloading is missing
             candidates!");
      if (Result.isInvalid())
        PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);

The assert() catches cases where we're wrong in a +Asserts build. The
"if" makes sure that, if this happens in a production clang
(-Asserts), we still build the proper built-in operator and continue
on our merry way. This is effectively what happened before this
change, but we've added the assert() to catch more flies.

llvm-svn: 83175
2009-09-30 21:46:01 +00:00
Bob Wilson 64c8d5a004 Fix a comment typo.
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Douglas Gregor 3dc959f88b Tweak CHECK lines to eliminate a failure on i686-apple-darwin10
llvm-svn: 83173
2009-09-30 21:39:51 +00:00
Devang Patel 48575e3f2e Check for null MDNode element while printing comment.
llvm-svn: 83172
2009-09-30 21:26:51 +00:00
Bob Wilson 53904987ae Fix a comment.
llvm-svn: 83171
2009-09-30 21:26:13 +00:00
Bob Wilson 699702e0a8 The AsmPrinter base class contains a DwarfWriter member, so there's no need
for derived AsmPrinters to add another one.  In some cases, fixing this
removes the need to override the doInitialization method.

llvm-svn: 83170
2009-09-30 21:24:45 +00:00
Fariborz Jahanian db82308633 Issue good diagnostics when initializing a refernce type with
a bad initializer. Fixes pr4274.

llvm-svn: 83169
2009-09-30 21:23:30 +00:00
Jeffrey Yasskin 8ce67f83bc Assert that ConstantArrays are created with correctly-typed elements.
llvm-svn: 83168
2009-09-30 21:08:08 +00:00
Dan Gohman ea0bb8f555 Fix this code so that it doesn't try to iterate through a std::vector
while calling changeImmediateDominator, which removes elements from the
vector. This fixes PR5097.

llvm-svn: 83166
2009-09-30 20:54:16 +00:00
Tanya Lattner fd2dcba7f3 Add an error for function parameters that have a qualified address space since this is not allowed by the embedded c extension spec.
llvm-svn: 83165
2009-09-30 20:47:43 +00:00
Reid Kleckner cea8dab1d1 Silence comparison always false warning in -Asserts mode.
llvm-svn: 83164
2009-09-30 20:43:07 +00:00
Jim Grosbach c87197784a Add additional assert() to verify no extraneous use of a scavenged register.
llvm-svn: 83163
2009-09-30 20:35:36 +00:00
Chris Lattner b355495660 fix line #'s
llvm-svn: 83162
2009-09-30 20:20:06 +00:00