Commit Graph

103854 Commits

Author SHA1 Message Date
Stephen Wilson 2b899767e1 Fix struct vs. class warning.
ParserVars is declared using the class keyword. This solves the warning.

llvm-svn: 129289
2011-04-11 19:38:03 +00:00
Johnny Chen 74adbddade Trivial comment fix.
llvm-svn: 129288
2011-04-11 18:51:50 +00:00
Evan Cheng fe917efc8b Fix a couple of places where changes are made but not tracked.
llvm-svn: 129287
2011-04-11 18:47:20 +00:00
Johnny Chen 66fab75920 Check invalid register encodings for LdFrm/StFrm ARM instructions and flag them as
invalid instructions.

llvm-svn: 129286
2011-04-11 18:34:12 +00:00
Howard Hinnant a23551cad4 Fix bug in Sseq constraints found by Seth Cantrell
llvm-svn: 129285
2011-04-11 18:22:12 +00:00
Kevin Enderby 9377a52c12 Adding support for printing operands symbolically to llvm's public 'C'
disassembler API.  Hooked this up to the ARM target so such tools as Darwin's
otool(1) can now print things like branch targets for example this:
  blx _puts
instead of this:
  blx #-36
And even print the expression encoded in the Mach-O relocation entried for
things like this:
  movt r0, :upper16:((_foo-_bar)+1234)

llvm-svn: 129284
2011-04-11 18:08:50 +00:00
Jakob Stoklund Olesen f8beafe207 Don't add live ranges for sub-registers when clobbering a physical register.
Both coalescing and register allocation already check aliases for interference,
so these extra segments are only slowing us down.

This speeds up both linear scan and the greedy register allocator.

llvm-svn: 129283
2011-04-11 18:08:10 +00:00
Caroline Tice 88544c5f2c Implement ARM emulation function to handle "SUBS PC, LR and related instructions".
llvm-svn: 129279
2011-04-11 15:51:10 +00:00
Jakob Stoklund Olesen 4fbbe3689d Speed up LiveIntervalUnion::unify by handling end insertion specially.
This particularly helps with the initial transfer of fixed intervals.

llvm-svn: 129277
2011-04-11 15:00:44 +00:00
Jakob Stoklund Olesen bfabc494f5 Time the initial seeding of live registers
llvm-svn: 129276
2011-04-11 15:00:42 +00:00
Jakob Stoklund Olesen 96d04c8e00 Don't shrink live ranges after dead code elimination unless it is going to help.
In particular, don't repeatedly recompute the PIC base live range after rematerialization.

llvm-svn: 129275
2011-04-11 15:00:39 +00:00
Oscar Fuentes c6f2d0a4cf CMake: remove some unnecesary code and ToDos.
Patch by arrowdodger!

llvm-svn: 129274
2011-04-11 14:52:39 +00:00
Anders Carlsson 0c63350b0b If there's an invoke destination, we should use invoke instead of call when calling the __cxa_bad_typeid function. Fixes PR7400.
llvm-svn: 129273
2011-04-11 14:13:40 +00:00
Jay Foad 0159a1ee11 Fix or remove code which seemed to think that the operand of a Constant
was always a User.

llvm-svn: 129272
2011-04-11 09:48:55 +00:00
Jay Foad 7c14a558fe Don't include Operator.h from InstrTypes.h.
llvm-svn: 129271
2011-04-11 09:35:34 +00:00
Jay Foad 29426e87c1 Phi nodes always use an even number of operands, so don't ever allocate
an odd number.

llvm-svn: 129270
2011-04-11 09:25:51 +00:00
John McCall 2d2e870745 More __unknown_anytype work.
llvm-svn: 129269
2011-04-11 07:02:50 +00:00
NAKAMURA Takumi 62920834fa docs/CommandGuide/index.html: Fix CSS url to relative.
llvm-svn: 129268
2011-04-11 03:27:38 +00:00
NAKAMURA Takumi 2a7024fa6c docs/CommandLine.html: "ize.
llvm-svn: 129267
2011-04-11 03:27:31 +00:00
Howard Hinnant 40dab2ce86 http://llvm.org/bugs/show_bug.cgi?id=9672
llvm-svn: 129266
2011-04-11 02:18:41 +00:00
Anders Carlsson 8a01a751c9 Remove CK_DynamicToNull.
llvm-svn: 129265
2011-04-11 02:03:26 +00:00
Anders Carlsson c1c9971cab When we know that a dynamic_cast always returns null, we can make
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast 
exception.

llvm-svn: 129264
2011-04-11 01:45:29 +00:00
Anders Carlsson 267c0c930e Add CXXDynamicCastExpr::isAlwaysNull() which will be replacing the cast kind I added.
llvm-svn: 129263
2011-04-11 01:43:55 +00:00
Anders Carlsson 882d790f72 Clean up CodeGenFunction::EmitDynamicCast. No functionality change.
llvm-svn: 129262
2011-04-11 00:46:40 +00:00
Anders Carlsson 98981b10c8 Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.
llvm-svn: 129261
2011-04-11 00:30:07 +00:00
Eli Friedman 554eba9c08 PR9669: implement correct checking for [dcl.init.string]p2.
llvm-svn: 129260
2011-04-11 00:23:45 +00:00
Bill Wendling 35a9c3cd72 Revert r129235 pending a vetting of the EH rewrite.
--- Reverse-merging r129235 into '.':
D    test/Feature/bb_attrs.ll
U    include/llvm/BasicBlock.h
U    include/llvm/Bitcode/LLVMBitCodes.h
U    lib/VMCore/AsmWriter.cpp
U    lib/VMCore/BasicBlock.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLLexer.cpp
U    lib/AsmParser/LLToken.h
U    lib/Bitcode/Reader/BitcodeReader.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp

llvm-svn: 129259
2011-04-10 23:18:04 +00:00
Anders Carlsson 50ddb5cc0a Remove the CodeGenCXX/dyncast.cpp test; it isn't really super useful to match on huge chunks of LLVM output.
llvm-svn: 129258
2011-04-10 23:15:15 +00:00
Anders Carlsson c602006638 As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.

For example:

struct A {
  virtual ~A();
};
struct B final : A { };
struct C { };

bool f(B* b) {
  return dynamic_cast<C*>(b);
}

llvm-svn: 129256
2011-04-10 20:33:22 +00:00
Howard Hinnant 784ba65787 Changes to cerrno to protect against the case the ELAST is not defined.
llvm-svn: 129255
2011-04-10 19:46:55 +00:00
John McCall 3aef3d8713 Simplify calling CheckPlaceholderExpr, converge on it in a few places,
and move a vector-splat check to follow l-value conversion.

llvm-svn: 129254
2011-04-10 19:13:55 +00:00
Anders Carlsson c53d9e8350 Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.
llvm-svn: 129253
2011-04-10 18:20:53 +00:00
Anders Carlsson e5ec21c977 Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.
llvm-svn: 129252
2011-04-10 18:00:32 +00:00
Howard Hinnant 1444d85b5a time_get was missing the %F specifier. This change impacts the binary.
llvm-svn: 129251
2011-04-10 17:54:14 +00:00
Anders Carlsson 68aad14dd3 Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.
llvm-svn: 129250
2011-04-10 17:42:45 +00:00
Nicolas Geoffray 9137ee85de Bugfix in the Cpp backend after API change on PHINode::Create.
llvm-svn: 129248
2011-04-10 17:39:40 +00:00
Oscar Fuentes dbe99ba37d CMake: support for using LLVM from client projects with find_package.
Patch by arrowdodger!

llvm-svn: 129247
2011-04-10 16:17:49 +00:00
Oscar Fuentes 643f1868de Reflect rename on LLVM cmake file.
llvm-svn: 129246
2011-04-10 16:17:31 +00:00
Garrison Venn 88bd9d6bb8 Fixed more best practices, and explicit/implicit style guide issues.
llvm-svn: 129245
2011-04-10 14:06:52 +00:00
Chandler Carruth 016ef400c4 Enhance the diagnostic for literal float -> int conversions to suggest
rewriting the literal when the value is integral. It is not uncommon to
see code written as:

  const int kBigNumber = 42e5;

Without any real awareness that this is no longer an ICE. The note helps
automate and ease the process of fixing code that violates the warning.

llvm-svn: 129243
2011-04-10 08:36:24 +00:00
Francois Pichet 8cb243a78f Refactor 129240 to merge the old default argument into the new parameter.
llvm-svn: 129242
2011-04-10 04:58:30 +00:00
Eli Friedman 493c34a86c PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.
While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.

llvm-svn: 129241
2011-04-10 04:44:11 +00:00
Francois Pichet 53fe2bb29e MSVC accepts that default parameters be redefined for member functions
of template class. The new value is ignored.

This fixes 1 error when parsing MSVC 2010 header files with clang.

llvm-svn: 129240
2011-04-10 03:03:52 +00:00
Oscar Fuentes 87eb515aba libclang output name is now libclang. This solves a name collision
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.

llvm-svn: 129239
2011-04-10 02:29:27 +00:00
Oscar Fuentes fe40844fb6 Reword instructions for running tests on Visual Studio.
Suggested by Maël Hörz.

llvm-svn: 129237
2011-04-10 01:41:55 +00:00
Bill Wendling 3d5450d809 Beginning of the Great Exception Handling Rewrite.
* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.

Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.

(This is a work-in-progress.)

llvm-svn: 129235
2011-04-10 00:04:27 +00:00
John McCall 39439739cf Fix a bunch of major problems with __unknown_anytype and properly test
for them.  The only major missing feature is references.

llvm-svn: 129234
2011-04-09 22:50:59 +00:00
Chris Lattner b799b2d4be drive by bug fix: DenseMapInfo::isEqual should be determined according to
isEqual of its members, not operator==.

llvm-svn: 129233
2011-04-09 21:20:23 +00:00
Chris Lattner 077f0179bb LLVMCC_EMITIR_FLAG is already either -emit-llvm or -fplugin-arg-dragonegg-emit-ir, so don't add an extra leading -. Clang doesn't accept --emit-llvm.
llvm-svn: 129232
2011-04-09 19:56:28 +00:00
Eli Friedman db42a3e876 Make sure we or together the overflow flags of the multiply and add, so the
check is triggered appropriately.  Reported on cfe-dev.

llvm-svn: 129231
2011-04-09 19:54:33 +00:00