Commit Graph

83159 Commits

Author SHA1 Message Date
Douglas Gregor cd121fb013 Introduce a limit on the depth of the macro instantiation backtrace
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.

This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.

llvm-svn: 103014
2010-05-04 17:13:42 +00:00
Evan Cheng a5c0cc329e Rename variables for consistency.
llvm-svn: 103013
2010-05-04 17:12:26 +00:00
Daniel Dunbar 9b816a1bb3 MC/X86: Add "support" for matching ATT style mnemonic prefixes.
- The idea is that when a match fails, we just try to match each of +'b', +'w',
   +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept
   it. If all match, we assume it is width generic, and take the 'l' form.

 - This would be a horrible hack, if it weren't so simple. Therefore it is an
   elegant solution! Chris gets the credit for this particular elegant
   solution. :)

 - Next step to making this more robust is to have the X86 matcher generate the
   mnemonic prefix information. Ideally we would also compute up-front exactly
   which mnemonic to attempt to match, but this may require more custom code in
   the matcher than is really worth it.

llvm-svn: 103012
2010-05-04 16:12:42 +00:00
Douglas Gregor 40c92bbe4f When creating a call to a base subobject's operator= in an
implicitly-defined copy assignment operator, suppress the protected
access check. This eliminates the remaining failure in the
Boost.SmartPtr library (that was a product of the copy-assignment
generation rewrite) and, presumably, the Boost.TR1 library as well.

llvm-svn: 103010
2010-05-04 15:20:55 +00:00
Duncan Sands 8815f38312 Fix a problem exposed by my previous commit and noticed by a release-asserts
buildbot: the debugging and non-debugging versions of getFunction were not
functionally equivalent: the non-debugging version wrongly assumed that if a
metadata operand was not metadata, then it had a non-null containing function.
This is not true, since the operand might be a global value, constant etc.

llvm-svn: 103008
2010-05-04 14:25:42 +00:00
Duncan Sands c2928c6ef5 Fix a variant of PR6112 found by thinking about it: when doing
RAUW of a global variable with a local variable in function F,
if function local metadata M in function G was using the global
then M would become function-local to both F and G, which is not
allowed.  See the testcase for an example.  Fixed by detecting
this situation and zapping the metadata operand when it occurs.

llvm-svn: 103007
2010-05-04 12:43:36 +00:00
Sebastian Redl 80fecfff45 Let StmtDumper.cpp handle using declarations.
llvm-svn: 103006
2010-05-04 10:20:17 +00:00
Gabor Greif 4c0f838637 fix operand indexes when outputting InvokeInsts
llvm-svn: 103003
2010-05-04 09:23:54 +00:00
Devang Patel 075e9b5d66 Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
llvm-svn: 103001
2010-05-04 06:15:30 +00:00
Chris Lattner 2dd1552588 improve bullets, patch by Mike Miller
llvm-svn: 103000
2010-05-04 05:19:07 +00:00
John McCall 9720514f3b An access is permitted if the current template instantiates to the appropriate
class.  Add some conservative support for the idea.  Fixes PR 7024.

llvm-svn: 102999
2010-05-04 05:11:27 +00:00
John McCall e61b02bcaf When inheriting a default argument expression, inherit the full expression,
not just the inner expression.  This is important if the expression has any
temporaries.  Fixes PR 7028.

Basically a symptom of really tragic method names.

llvm-svn: 102998
2010-05-04 01:53:42 +00:00
Dan Gohman 70a3b12193 Use the SCEVAddRecExpr::getPostIncExpr utility function instead
of doing the same thing manually.

llvm-svn: 102997
2010-05-04 01:12:27 +00:00
Dan Gohman 5f18c547da Fix a copy+pasto.
llvm-svn: 102996
2010-05-04 01:11:15 +00:00
Devang Patel 801b8ea42a Do not ignore debug loc attached with llvm.dbg.declare while collecting debug info used by a module.
llvm-svn: 102995
2010-05-04 01:05:02 +00:00
Evan Cheng 55869af998 Instruction selection optimizations may have moved the def of a function argument out of the entry block. rdar://7937489
llvm-svn: 102993
2010-05-04 00:58:39 +00:00
Kevin Enderby 8f0037097f Fix to r102952. The MOV64toSDrm record in X86Instr64bit.td needed the opcode
changed to 0x7E from 0x6E as well as the previous change of RPDI to S3SI.

llvm-svn: 102991
2010-05-04 00:42:46 +00:00
Daniel Dunbar 9989417f33 MC/Matcher: Add support for over-riding the default MatchInstruction function
name (for example, to allow targets to interpose the actual MatchInstruction
function).

llvm-svn: 102987
2010-05-04 00:33:13 +00:00
Daniel Dunbar ce0c1e11ce llvm-mc: Fix case were we would skip a line in the .s file after an instruction
match failure.

Also, fixes a few memory leak FIXMEs.

llvm-svn: 102986
2010-05-04 00:33:07 +00:00
Fariborz Jahanian 751f7bc03c Fixes a Code Gen. Crash when calling destructor on a __block
variabe. Blocks and their construction/destruction is
wip though. 

llvm-svn: 102985
2010-05-04 00:26:07 +00:00
Evan Cheng f869d9adf2 Teach scheduler about REG_SEQUENCE.
llvm-svn: 102984
2010-05-04 00:22:40 +00:00
Dan Gohman 7d5d5b9065 Add a polygen rule that reflects the fact that nsw and nuw can be
used together in either order.

llvm-svn: 102983
2010-05-04 00:13:24 +00:00
Dan Gohman 0e79c864c3 Re-enable isel kill flags, now that the local allocator is ignoring them.
llvm-svn: 102981
2010-05-04 00:12:15 +00:00
Jim Grosbach 30e637c9bc rdar://7937137 - dbg values not being handled in thumb1 version of
eliminateFrameIndex(), leading to llvm_unreachable() assertion failure.

llvm-svn: 102980
2010-05-04 00:11:37 +00:00
Dan Gohman 3b763f4ba0 Update one more 2.7 to 2.8.
llvm-svn: 102978
2010-05-03 23:52:21 +00:00
Dan Gohman 62af9d2723 Minimally update ReleaseNotes.html for 2.8 development; uncomment and
update the big red warning at the top. Most of the old content remains
and awaits revision.

Clear out the API changes section, and start it up again with a
mention of the add->fadd transition.

llvm-svn: 102977
2010-05-03 23:51:05 +00:00
Jakob Stoklund Olesen b944b39887 Remove preexisting kill flags in RegAllocLocal, just like LiveVariables does.
This should make it possible to start producing kill flags in isel without
breaking stuff.

llvm-svn: 102976
2010-05-03 23:49:20 +00:00
Dan Gohman 626b5d8e0c Factor out FastISel's code for materializing constants and other values
in registers into a separate function to de-couple it from the
top-down-specific logic in getRegForValue.

llvm-svn: 102975
2010-05-03 23:36:34 +00:00
Douglas Gregor 1bd7a94460 When computing the template arguments for the instantiation of a
friend function template, be sure to adjust the computed template
argument lists based on the location of the definition of the function
template: it's possible that the definition we're instantiating with
and the template declaration that we found when creating the
specialization are in different contexts, which meant that we would
end up using the wrong template arguments for instantiation.

Fixes PR7013; all Boost.DynamicBitset tests now pass.

llvm-svn: 102974
2010-05-03 23:29:10 +00:00
Dale Johannesen 81bfca7bde Implement builtin_return_address(x) and builtin_frame_address(x)
on PPC for x!=0.  7624113.

llvm-svn: 102972
2010-05-03 22:59:34 +00:00
Dan Gohman a2414ea190 Remove the API compatibility layer which converted add, sub, and mul
to fadd, fsub, and fmul, when used with a floating-point type. LLVM
has supported the new instructions since 2.6, so it's time to get
on board.

llvm-svn: 102971
2010-05-03 22:44:19 +00:00
Jakob Stoklund Olesen f4e4e84115 Check that subregisters don't have independent values in RemoveCopyByCommutingDef().
This fixes PR6941.

llvm-svn: 102970
2010-05-03 22:40:32 +00:00
Dan Gohman 0553acff5e Fix tests to use fadd, fsub, and fmul, instead of add, sub, and mul,
when the type is floating-point.

llvm-svn: 102969
2010-05-03 22:36:46 +00:00
Eric Christopher 1e679cbfff Reword a comment slightly.
llvm-svn: 102966
2010-05-03 22:18:49 +00:00
Dan Gohman 1d2ded75e2 Use getConstant instead of getIntegerSCEV. The two are basically the
same, now that getConstant has overloads consistent with ConstantInt::get.

llvm-svn: 102965
2010-05-03 22:09:21 +00:00
Bill Wendling 06bf470104 Revert r102948.
llvm-svn: 102964
2010-05-03 21:51:21 +00:00
Bob Wilson d57269df5e Remove special case for llvmCore_Embedded project. This is no longer needed
since llvmCore is built as part of llvmgcc42 now.

llvm-svn: 102962
2010-05-03 21:41:24 +00:00
John McCall 5828ee7a27 Just bail out immediately when emitting an unreachable function-local static
variable.  Surprisingly, this does seem to be the right way to solve this.

llvm-svn: 102961
2010-05-03 21:39:56 +00:00
Bob Wilson c936b56871 Print basic block numbers in live interval debug output. Since the rest of the
debug output is showing machine instructions, the IR-level basic block names
aren't very meaningful, and because multiple machine basic blocks may be
derived from one IR-level BB, they're also not unique.

llvm-svn: 102960
2010-05-03 21:38:11 +00:00
Nick Lewycky ab09a2cded Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.
llvm-svn: 102959
2010-05-03 21:36:51 +00:00
Kevin Enderby 6f2f8d0798 Changed llvm-mc to use the same suffixes with floating point compare
instructions as the Mac OS X darwin assembler.  Some of which like 'fcoml'
assembled to different opcodes.  While some of the suffixes were just different.

llvm-svn: 102958
2010-05-03 21:31:40 +00:00
Fariborz Jahanian ce7ddf7bf7 Test for my last patch.
llvm-svn: 102956
2010-05-03 21:06:59 +00:00
Fariborz Jahanian 5e5998f014 For the sake of Objective-c++ overload resolution,
treat argument types of objective-c pointer types
which only differ in their protocol qualifiers as
the same type (radar 7925668).

llvm-svn: 102955
2010-05-03 21:06:18 +00:00
Kevin Enderby e3a1726034 Fixed the encoding of two of the X86 movq instuctions. The Move quadword from
mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect
encodings.

llvm-svn: 102952
2010-05-03 21:03:31 +00:00
Kevin Enderby 1a51d4cec9 Fixed the encoding of the x86 push instructions. Using a 32-bit immediate value
caused the a pushl instruction to be incorrectly encoding using only two bytes
of immediate, causing the following 2 instruction bytes to be part of the 32-bit
immediate value.  Also fixed the one byte form of push to be used when the
immediate would fit in a signed extended byte.  Lastly changed the names to not
include the 32 of PUSH32 since they actually push the size of the stack pointer.

llvm-svn: 102951
2010-05-03 20:45:05 +00:00
Bill Wendling 88c734e8ae Testcase for r102947.
llvm-svn: 102948
2010-05-03 20:39:35 +00:00
Dan Gohman 267700c5aa Silence warnings about -1 being converted to an unsigned value.
Also, pass true for isSigned even when creating constants for unsigned
comparisons, because the point is to create an all-ones constant,
rather than UINT64_MAX, even for integers wider than 64 bits.

llvm-svn: 102946
2010-05-03 20:23:47 +00:00
Douglas Gregor 70b21be380 When instantiating a function-local variable definition, introduce the
mapping from the declaration in the template to the instantiated
declaration before transforming the initializer, in case some crazy
lunatic decides to use a variable in its own initializer. Fixes PR7016.

llvm-svn: 102945
2010-05-03 20:22:41 +00:00
Ted Kremenek acc59c3ec9 Workaround: Don't add ObjCMethodDecls to the vector of TopLevelDecls since they don't go in
the DeclContext for the translation unit.  This is to workaround a fundamental issue in how
ObjC decls (within an @implementation) are parsed before the ObjCContainerDecl is available.

llvm-svn: 102944
2010-05-03 20:16:35 +00:00
Douglas Gregor aee1f51485 If we're generating code to create a pointer-to-member function
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.

llvm-svn: 102942
2010-05-03 20:00:27 +00:00