Commit Graph

106023 Commits

Author SHA1 Message Date
Chris Lattner b5865ded27 remove StandardPasses, it has been replaced with PassManagerBuilder
llvm-svn: 131827
2011-05-22 00:30:45 +00:00
Chris Lattner 3d70addad7 switch opt to using PassManagerBuilder.h
llvm-svn: 131824
2011-05-22 00:21:33 +00:00
Chris Lattner ac99108d36 switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.

llvm-svn: 131823
2011-05-22 00:21:15 +00:00
Douglas Gregor a51c9ccf2d Add an assertion to tell us when we're going off the deep end trying
to determine outer template arguments lists for template
parameters. This is actually the problem behind PR9643, which I have
yet to figure out how to fix.

llvm-svn: 131822
2011-05-22 00:21:10 +00:00
Chris Lattner f200a0af58 switch bugpoint and liblto to PassManagerBuilder.
llvm-svn: 131821
2011-05-22 00:20:07 +00:00
Chris Lattner fa9fe70a6a add support for LTO passes.
llvm-svn: 131820
2011-05-22 00:14:20 +00:00
Chris Lattner 04120e9567 eliminate dependence on StandardPasses.h. The code generator's pass pipeline
should eventually convert to PMBuilder, but I don't plan to do this.

llvm-svn: 131819
2011-05-22 00:13:44 +00:00
Howard Hinnant 5eb6bdfa1d __invokable and __invoke_of now check for incomplete types and issue a compile-time diagnostic if they are used with incomplete types for anything except a return type. Note that both arguments *and* parameters are checked for completeness.
llvm-svn: 131818
2011-05-22 00:09:02 +00:00
Charles Davis a8805fd71a Include DataTypes.h from this header to get the uint*_t types.
llvm-svn: 131817
2011-05-22 00:05:26 +00:00
Charles Davis 4ccc861cbc Allow access to the .pdata and .xdata sections through the TargetAsmInfo
class.

llvm-svn: 131816
2011-05-22 00:03:24 +00:00
Chris Lattner ecf0ba5bde adjust to mainline api change.
llvm-svn: 131815
2011-05-21 23:50:44 +00:00
Chris Lattner 34cc63cd71 add an extension point mechanism that allow plugins to add stuff to
the pass manager.

llvm-svn: 131814
2011-05-21 23:50:37 +00:00
Douglas Gregor 80af31397a Audit and finish the implementation of C++0x nullptr, fixing two
minor issues along the way:
  - Non-type template parameters of type 'std::nullptr_t' were not
  permitted.
  - We didn't properly introduce built-in operators for nullptr ==,
  !=, <, <=, >=, or > as candidate functions .

To my knowledge, there's only one (minor but annoying) part of nullptr
that hasn't been implemented: catching a thrown 'nullptr' as a pointer
or pointer-to-member, per C++0x [except.handle]p4.

llvm-svn: 131813
2011-05-21 23:15:46 +00:00
Nick Lewycky babca9aee9 Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans to
use these soon.

llvm-svn: 131812
2011-05-21 23:14:36 +00:00
Douglas Gregor 291e8ee206 It's considered poor form to create references to the overloaded
function type. Educate template argument deduction thusly, fixing
PR9974 / <rdar://problem/9479155>.

llvm-svn: 131811
2011-05-21 22:16:50 +00:00
Douglas Gregor b7c36f6c68 Classify bound member function types are member function types. Fixes
PR9973 / <rdar://problem/9479191>.

llvm-svn: 131810
2011-05-21 21:04:55 +00:00
Duncan Sands 5ec65765e6 Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
Original log message:
When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.

llvm-svn: 131809
2011-05-21 20:54:46 +00:00
Chris Lattner 5c12367b44 switch clang off StandardPasses.h onto PassManagerBuilder.h
llvm-svn: 131808
2011-05-21 20:40:11 +00:00
Chris Lattner 790cb34f93 add a new PassManagerBuilder class to replace StandardPasses.h
llvm-svn: 131807
2011-05-21 20:39:42 +00:00
Chris Lattner 4c0d9e2249 add a copy ctor to TargetLibraryInfo.
llvm-svn: 131806
2011-05-21 20:09:13 +00:00
Douglas Gregor 347e0f26be Fix our handling of the warning when one tries to pass a
non-POD/non-trivial object throuugh a C-style varargs. The warning
itself was default-mapped to error, but can be downgraded, but we were
treating it in Sema like a hard error, silently dropping the call.

Instead, treat this problem like a warning, and do what the warning
says we do: abort at runtime. To do so, we fake up a __builtin_trap()
expression that gets evaluated as part of the argument.

llvm-svn: 131805
2011-05-21 19:26:31 +00:00
Eli Friedman e08bca9eb4 Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,
and stop abusing the multi-level dereference isa<> used to allow.

llvm-svn: 131804
2011-05-21 19:15:39 +00:00
Eli Friedman 3de2ddc578 PR7952: Make isa<> use the same logic as cast<>, so that they both work
consistently.

llvm-svn: 131803
2011-05-21 19:13:10 +00:00
Douglas Gregor 781ba6e407 Diagnose the presence of storage-class-specifiers on explicit
instantiations and specializations. Fixes <rdar://problem/9126453> and PR8700.

llvm-svn: 131802
2011-05-21 18:53:30 +00:00
Benjamin Kramer e30b70073a X86: smulo -> add is now done target-independently in DAGCombiner, remove the patterns.
llvm-svn: 131801
2011-05-21 18:32:01 +00:00
Benjamin Kramer 2fd48f2730 Implement mulo x, 2 -> addo x, x in DAGCombiner.
llvm-svn: 131800
2011-05-21 18:31:55 +00:00
Benjamin Kramer e08fb1dce9 Merge and FileCheckize test cases.
llvm-svn: 131799
2011-05-21 18:31:48 +00:00
Benjamin Kramer fda5dc4968 Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X".

llvm-svn: 131798
2011-05-21 18:31:42 +00:00
Douglas Gregor 097984480d Clang is now correctly marking this as a class, so update the test case accordingly
llvm-svn: 131797
2011-05-21 18:17:06 +00:00
Douglas Gregor 9574af6ea2 Teach Sema::ActOnUninitializedDecl() not to try to interpret when one
should use a constructor to default-initialize a
variable. InitializationSequence knows the rules for default
initialization, better. Fixes <rdar://problem/8501008>.

llvm-svn: 131796
2011-05-21 17:52:48 +00:00
Charles Davis 6879634efd Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas.

llvm-svn: 131795
2011-05-21 17:36:25 +00:00
Douglas Gregor 643c922e66 Introduce the -fdiagnostics-format=xxx option to control how Clang
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.

Note that we no longer change the diagnostic format based on
-fms-extensions.

Patch by Andrew Fish!

llvm-svn: 131794
2011-05-21 17:07:29 +00:00
Douglas Gregor 61b6e49ee1 A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups.
llvm-svn: 131793
2011-05-21 16:28:01 +00:00
Douglas Gregor 253cadfe68 Implement C++0x semantics for passing non-POD classes through varargs.
llvm-svn: 131792
2011-05-21 16:27:21 +00:00
Charles Davis 8e8f59bdfb A handler for a function in the Win64 EH scheme can be both an unwind handler
and an exception handler. Handle that case.

Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.

llvm-svn: 131791
2011-05-21 15:57:49 +00:00
Benjamin Kramer 691731eb9c InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
llvm-svn: 131789
2011-05-21 09:22:06 +00:00
Argyrios Kyrtzidis 627c14a068 Only ignore extra tokens after #else if we skip it, otherwise warn. Fixes rdar://9475098.
llvm-svn: 131788
2011-05-21 04:26:04 +00:00
Cameron Zwarich faeb520c97 Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC code. It
is already in GR64 for the same reasons. Since it isn't allocatable it can't cause
any problems.

llvm-svn: 131787
2011-05-21 04:13:49 +00:00
Akira Hatanaka 2df6c010aa Use the correct register to access stack frame objects.
llvm-svn: 131785
2011-05-21 03:01:03 +00:00
Akira Hatanaka f084fcd7fe Insert instructions that copy $sp to or from $fp at the right locations.
llvm-svn: 131784
2011-05-21 02:29:26 +00:00
Dan Gohman 8b20187c82 When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.

llvm-svn: 131781
2011-05-21 01:05:08 +00:00
Andrew Trick d5d0764b3b Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.

llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Johnny Chen 1c464d4961 A little refactoring.
llvm-svn: 131779
2011-05-21 00:55:57 +00:00
Johnny Chen e7faaa6688 When in non-raw mode and edis fails to parse the tokens of the instruction, output
the raw disassembly so that the opcode aligns with the edis'ed disassembly.

llvm-svn: 131773
2011-05-21 00:44:42 +00:00
Charles Davis 54254008ba Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
is needed for an upcoming patch.

llvm-svn: 131772
2011-05-21 00:09:04 +00:00
Greg Clayton 21c5ab4fe1 Lock the target API mutex correctly in all cases and make sure m_opaque_sp
contains a valid pointer before trying to access the target.

llvm-svn: 131771
2011-05-20 23:51:26 +00:00
Ted Kremenek 109b127e02 Fix regression in static analyzer's handling of prefix '--' operator. It was being treated as postfix '--' in C mode.
llvm-svn: 131770
2011-05-20 23:40:06 +00:00
Greg Clayton adc00cb2ba Centralize the code that gathers the thread ID list from the remote GDB
server so that it happens in command sequence where no other packets can
sneak between.

llvm-svn: 131769
2011-05-20 23:38:13 +00:00
Cameron Zwarich d7ee0fcac9 Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
actually fixes most of the VerifyCoalescing failures in test-suite.

llvm-svn: 131768
2011-05-20 23:25:36 +00:00
Akira Hatanaka 0837692ac6 Change the order fixed objects are created in MipsTargetLowering::LowerCall in
preparation for reversing StackDirection.

Fixed objects are created in the following order:  
 1. Incoming arguments passed on stack.
 2. va_arg objects (include both arguments that are passed in registers and
    pointer to the location of the first va_arg argument).
 3. $gp restore slot.
 4. Outgoing arguments passed on stack.
 5. Pointer to alloca'd space.

llvm-svn: 131767
2011-05-20 23:22:14 +00:00