Commit Graph

92630 Commits

Author SHA1 Message Date
Greg Clayton 90a2acd441 One final patch for all of this class constructor, destructor, and conversion
operator naming stuff. We now get the constructor and destructor names right
after passing in the type, and we get the correct conversion operator name
after passing in the return type when getting the DeclarationNameInfo.

llvm-svn: 115398
2010-10-02 01:40:05 +00:00
Johnny Chen 1e190a552f Use a more robust regexp to search for the 'Code' symbol. Plus compile the
regexp once and use it within the for loop for some speedup.

llvm-svn: 115397
2010-10-02 01:23:40 +00:00
Nick Lewycky 306084e9b7 Wind these directories back too. File adds and removes are properly represented
in patches. :-(

llvm-svn: 115396
2010-10-02 01:16:59 +00:00
Nick Lewycky 0aee161c69 Continue reverting r115363.
llvm-svn: 115395
2010-10-02 01:08:17 +00:00
Sean Callanan 9c5fe130e1 Update to the latest Clang, which fixes a problem
with importing class/struct types.

llvm-svn: 115394
2010-10-02 01:07:50 +00:00
Nick Lewycky c18b735552 Revert patches r115363 r115367 r115391 due to build breakage:
llvm[2]: Updated LibDeps.txt because dependencies changed
llvm[2]: Checking for cyclic dependencies between LLVM libraries.
find-cycles.pl: Circular dependency between *.a files:
find-cycles.pl:   libLLVMMSP430AsmPrinter.a libLLVMMSP430CodeGen.a

llvm-svn: 115393
2010-10-02 01:06:42 +00:00
Jim Grosbach aaf9c32d9f Update CMake files for recent AsmPrinter->InstPrinter changes. Can someone who
is more familiar with CMake please review?

llvm-svn: 115391
2010-10-02 00:39:56 +00:00
Eric Christopher 7787f79f21 Start on lowering global addresses.
llvm-svn: 115390
2010-10-02 00:32:44 +00:00
Kevin Enderby a8d176866d This adds a Darwin x86_64 relocation encoding for a subtraction expression
where both symbols are "local", that is non-external symbols, and there is
no "base" for the symbols used in the expression, that is the section has
no non-temporary symbols.  This case looks like this:

% cat local_reloc_A-B.s
	.long 0
LB:	.long 1
	.long LA - LB - 4
	.long 2
LA:	.long 3

which llvm-mc will not encode without this patch, generates a "unsupported
local relocations in difference" error, but the Darwin assembler will
encode with relocation entries like this:

% otool -rv a.out l.out 
a.out:
Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   False  SUB     False     1 (__TEXT,__text)
00000008 False long   False  UNSIGND False     1 (__TEXT,__text)

which is very similar to what is encoded when the symbols don't have the
leading 'L' and they are not temporary symbols.  Which llvm-mc and the
Darwin assembler will encoded like this:

Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   True   SUB     False     B
00000008 False long   True   UNSIGND False     A

This is the missing relocation encoding needed to allow the Mach-O x86
Dwarf file and line table to be emitted.  So this patch also removes the
TODO from the if() statement in MCMachOStreamer::Finish() that didn't 
call MCDwarfFileTable::Emit() for 64-bit targets.

llvm-svn: 115389
2010-10-02 00:13:41 +00:00
Chris Lattner 64d7f2a014 when expanding a builtin, if the argument is required to be a constant,
force it to be a constant instead of emitting with EmitScalarExpr.  In
-ftrapv mode, they are not the same.

This fixes rdar://8478728 + PR8221

llvm-svn: 115388
2010-10-02 00:09:12 +00:00
Douglas Gregor 0eaa2bfe79 Don't add an imported function into its lexical context until *after*
we've set all of its parameters. Fixes <rdar://problem/8499598>;
thanks to Sean for the diagnosis.

llvm-svn: 115387
2010-10-01 23:55:07 +00:00
Jakob Stoklund Olesen bfea05afd6 Drop the use of LiveInterval::iterator and the LiveRange class in
RemoveCopyByCommutingDef.

llvm-svn: 115386
2010-10-01 23:52:27 +00:00
Jakob Stoklund Olesen 28792c4a3d When RemoveCopyByCommutingDef is creating additional identity copies, just use
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and
getting it wrong.

This fixed PR8249 where a valno with a multi-segment live range was defined by
an identity copy created by RemoveCopyByCommutingDef. Some of the live
segments disappeared.

llvm-svn: 115385
2010-10-01 23:52:25 +00:00
Jakob Stoklund Olesen 8fd5b3c071 Pretty up the debug output during RemoveCopyByCommutingDef.
llvm-svn: 115384
2010-10-01 23:52:22 +00:00
Chris Lattner 07e96866a2 tidy
llvm-svn: 115383
2010-10-01 23:43:16 +00:00
Chris Lattner 407e7e3ace kill off CheckX86BuiltinFunctionCall
llvm-svn: 115382
2010-10-01 23:40:43 +00:00
Chris Lattner 04b03b1fc4 move imperative code to declarative definitions.
llvm-svn: 115381
2010-10-01 23:35:58 +00:00
Johnny Chen 7fce877aa5 I committed too fast. Both "struct objc_selector *" and "SEL" are possible,
depending on the compiler used.  Former if gcc/llvm-gcc, and latter if clang.

llvm-svn: 115380
2010-10-01 23:34:28 +00:00
Devang Patel d18c5aa20a Mark explict methods as explict in debug info.
llvm-svn: 115379
2010-10-01 23:32:17 +00:00
Devang Patel e1c714647c Add support to let FE mark explict methods as explict in debug info.
llvm-svn: 115378
2010-10-01 23:31:40 +00:00
Jim Grosbach 0091535361 Nuke trailing whitespace.
llvm-svn: 115377
2010-10-01 23:29:12 +00:00
Jim Grosbach ff1751c0a6 PrintSpecial() can go away now.
llvm-svn: 115376
2010-10-01 23:27:48 +00:00
Eric Christopher 83a5ec8fe0 Stub out constant GV handling, fixes C++ eh tests.
llvm-svn: 115375
2010-10-01 23:24:42 +00:00
Chris Lattner 3be167f606 diagnose errors when a builtin that require constant arguments don't have them.
For example, on:

#include <emmintrin.h>
int foo(int N) {
 __m128i white2;
 white2 = _mm_slli_si128(white2, N);
 return 0;
} 

we used to get:
fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq

now we get:
/Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a
      constant integer
 white2 = _mm_slli_si128(white2, N);
          ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/sabre/t.c:1:
/Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from:
  ((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8))
            ^                                         ~~~~~~~
1 error generated.

llvm-svn: 115374
2010-10-01 23:23:24 +00:00
Jim Grosbach fae8305e2b Nuke the rest of the :comment references
llvm-svn: 115373
2010-10-01 23:21:38 +00:00
Johnny Chen 9eaa69699a Updated the expected match string when stopped on an objc instance method from:
ARG: (struct objc_selector *) _cmd

to

    ARG: (SEL) _cmd

The change most likely resulted from an update from the llvm tot with a newer clang.

llvm-svn: 115372
2010-10-01 23:21:20 +00:00
Greg Clayton a3c444ac23 Get the declaration names for C++ ctors, dtors, and operators from the
right name pools.

llvm-svn: 115371
2010-10-01 23:13:49 +00:00
Jim Grosbach c13194254b Nuke a bunch of no-longer-needed comment-only asm strings.
llvm-svn: 115370
2010-10-01 23:09:33 +00:00
Johnny Chen b781cf0022 Commented out two debug prints.
llvm-svn: 115369
2010-10-01 23:05:03 +00:00
Johnny Chen da88434b39 o Added a new feature to the test framework to skip long running tests conditionally.
To not skip long running tests, pass '-l' to the test driver (dotest.py).

  An example:

    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
    def test_foundation_disasm(self):
        ...

o Added a long running disassemble test to the foundation directory, which iterates
  the code symbols from Foundation.framework and kicks off a disassemble command for
  for the named function symbol.  Found a crasher: rdar://problem/8504895.

o Plus added/updated some comments for the TestBase class.

llvm-svn: 115368
2010-10-01 22:59:49 +00:00
Jim Grosbach 111c550dea Now that the asmprinter itself isn't in the subdir, rename 'AsmPrinter' to
'InstPrinter' to fall into line with the other MC-ized assembly printer
using targets.

llvm-svn: 115367
2010-10-01 22:57:18 +00:00
Chris Lattner bd6e69368f enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
are required to be ICE's.  No clients of this new functionality yet!

llvm-svn: 115366
2010-10-01 22:53:11 +00:00
Evan Cheng a317815463 Fix r115332: correctly model AGU / NEON mux.
llvm-svn: 115365
2010-10-01 22:52:29 +00:00
Owen Anderson f31f33ea89 Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs. For now,
stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide
more nuanced estimates in the future.

llvm-svn: 115364
2010-10-01 22:45:50 +00:00
Jim Grosbach 517abb44a2 Move the asmprinter and MC lowering out of the AsmPrinter (soon to be
InstPrinter) subdir

llvm-svn: 115363
2010-10-01 22:45:38 +00:00
Devang Patel cac38900f1 Fix block descriptor documentation.
llvm-svn: 115362
2010-10-01 22:45:00 +00:00
Chris Lattner dc226c2b9b random cleanups, no functionality change.
llvm-svn: 115361
2010-10-01 22:42:38 +00:00
Jim Grosbach 0e854f3d43 Rename the AsmPrinter directory to InstPrinter for those targets that have
been MC-ized for assembly printing. MSP430 is mostly so, but still has the
asm printer and lowering code in the printer subdir for the moment.

llvm-svn: 115360
2010-10-01 22:39:28 +00:00
Jim Grosbach d4ee8453a6 Remove self-described temporary hack. A bit over a year seems a reasonable
delay. Anton and PIC16 folks, if this is still good to keep, please go ahead
and add it back in with an updated comment about when would be a good time
to revisit.

llvm-svn: 115358
2010-10-01 22:32:12 +00:00
Gabor Greif 594ce3573a Doug's feedback
llvm-svn: 115356
2010-10-01 22:12:38 +00:00
Gabor Greif 16e028617c Factor out enumerator APSInt adjustment into
a helper function (AdjustAPSInt) and use that
for adjusting the high bounds of case ranges
before APSInt comparisons. Fixes
http://llvm.org/bugs/show_bug.cgi?id=8135

Some minor refacorings while I am here.

llvm-svn: 115355
2010-10-01 22:05:14 +00:00
Evan Cheng 1969887fc6 Fix scheduling infor for vmovn and vshrn which I broke accidentially.
llvm-svn: 115354
2010-10-01 21:48:06 +00:00
Evan Cheng f3179567de Add operand cycles for vldr / vstr.
llvm-svn: 115353
2010-10-01 21:40:30 +00:00
Bill Wendling bf73fe5e8d Need to specify SSE4 for machines which don't have SSE4. The code checked for is generated by SSE4. Otherwise, we get something else.
llvm-svn: 115352
2010-10-01 21:39:35 +00:00
Caroline Tice 8d88020e92 Uncomment/fix "-f" command option for disassemble command.
llvm-svn: 115351
2010-10-01 21:34:54 +00:00
Eric Christopher 9d0136274b Direct calls only for arm fast isel for now.
llvm-svn: 115350
2010-10-01 21:33:12 +00:00
Fariborz Jahanian de744dcce1 Restore test. Is for //rdar://8493239
llvm-svn: 115349
2010-10-01 21:26:26 +00:00
Francois Pichet 77339c7c98 Fix typo
llvm-svn: 115348
2010-10-01 21:20:39 +00:00
Francois Pichet 6d76e6cd92 Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.
Example: 
class A {
   void A::foo(); //warning: extra qualification on member 'foo'
};

llvm-svn: 115347
2010-10-01 21:19:28 +00:00
Douglas Gregor e6712983d2 Teach clang_getCursorReferenced() about Objective-C property reference
and protocol expressions. Fixes <rdar://problem/7833565>.

llvm-svn: 115346
2010-10-01 21:11:22 +00:00