Commit Graph

122336 Commits

Author SHA1 Message Date
Howard Hinnant 425e44d192 Remove reference from common_type definition. It looks like a recent clang decltype implementation got fixed/improved and exposed this. Fixes http://llvm.org/bugs/show_bug.cgi?id=12007.
llvm-svn: 150581
2012-02-15 15:08:30 +00:00
David Chisnall f571cde869 First pass at Solaris toolchain support. This version compiles and links hello
world on Solaris 11 for both x86 and x86-64 using the built-in assembler and
Solaris (not GNU) ld, however it currently relies on a hard-coded GCC location
to find crtbegin.o and crtend.o, as well as libgcc and libgcc_eh.  

llvm-svn: 150580
2012-02-15 13:39:01 +00:00
Dmitri Gribenko 7bde858705 Convert ad-hoc `int array[expr ? -1 : 1]' assertions
in test/SemaCXX/nullptr.cpp to static_assert

llvm-svn: 150579
2012-02-15 13:30:53 +00:00
Hans Wennborg d99d688358 Make -Wformat fix-its preserve original conversion specifiers.
This commit makes PrintfSpecifier::fixType() and ScanfSpecifier::fixType()
only fix a conversion specification enough that Clang wouldn't warn about it,
as opposed to always changing it to use the "canonical" conversion specifier.
(PR11975)

This preserves the user's choice of conversion specifier in cases like:

printf("%a", (long double)1);
where we previously suggested "%Lf", we now suggest "%La"

printf("%x", (long)1);
where we previously suggested "%ld", we now suggest "%lx".

llvm-svn: 150578
2012-02-15 09:59:46 +00:00
Tobias Grosser f12cea4257 CodeGen: Update the BasicBlock pointer correctly when creating 'polly.split...'
Problem reported by: Ryan Taylor <ryta1203@gmail.com>

llvm-svn: 150577
2012-02-15 09:58:53 +00:00
Tobias Grosser cb47dfeb96 CodeGen: Retain the old BB names within the original SCoP
llvm-svn: 150576
2012-02-15 09:58:50 +00:00
Tobias Grosser b61e6318ac CodeGen: Name stmt bbs 'polly.stmt.' + OriginalName
llvm-svn: 150575
2012-02-15 09:58:46 +00:00
Tobias Grosser 1e03ad7213 ScheduleOpt: Only get RAW dependences if we asked for raw
llvm-svn: 150574
2012-02-15 09:58:42 +00:00
Alexey Samsonov 1e7e2370aa AddressSanitizer: don't include pthread.h in asan_interceptors.cc on Linux
llvm-svn: 150573
2012-02-15 09:14:26 +00:00
Bill Wendling dfb45f4d68 Strip the pointer casts from the constants here.
The c'tor list is stored as a list of 'void ()*'s, so all of the functions are
bitcast to that. However, the dyn_cast doesn't automagically look through
bitcasts. Do that for it.
<rdar://problem/10813350>

llvm-svn: 150572
2012-02-15 09:14:08 +00:00
Eric Christopher 24e51b7f29 Add a way to replace a field inside a metadata node. This can be
used to incrementally update a created node without needing a
temporary node and RAUW.

llvm-svn: 150571
2012-02-15 09:09:29 +00:00
Alexey Samsonov 278c25f241 AddressSanitizer: simplify IntervalsAreSeparate function
llvm-svn: 150569
2012-02-15 08:27:34 +00:00
Andrew Trick 899f46c113 Revert r150565 again. Appears to be a stage2 failure with dragonegg.
I'll put MachineLICM back before PEI. All my arm/x86 benchmarks look good, but buildbots don't like it.

llvm-svn: 150568
2012-02-15 07:57:03 +00:00
Andrew Trick 56d412a147 Reapply r150565 with the typo fix properly merged.
llvm-svn: 150567
2012-02-15 05:43:27 +00:00
Andrew Trick dd5beb78a7 reverting r150565. Premature push.
llvm-svn: 150566
2012-02-15 05:22:12 +00:00
Andrew Trick d83284c196 Move PostRAMachineLICM into MachineLateOptimization. It now runs after PEI!
llvm-svn: 150565
2012-02-15 05:13:47 +00:00
Lang Hames 1b384668e3 Add a check to make sure we don't assign slot indexes for instructions inside bundles.
llvm-svn: 150564
2012-02-15 04:33:48 +00:00
Andrew Trick e9a951c00b Allow CodeGen (llc) command line options to work as expected.
The llc command line options for enabling/disabling passes are local to CodeGen/Passes.cpp. This patch associates those options with standard pass IDs so they work regardless of how the target configures the passes.

A target has two ways of overriding standard passes:
1) Redefine the pass pipeline (override TargetPassConfig::add%Stage)
2) Replace or suppress individiual passes with TargetPassConfig::substitutePass.

In both cases, the command line options associated with the pass override the target default.

For example, say a target wants to disable machine instruction scheduling by default:

- The target calls disablePass(MachineSchedulerID) but otherwise does not override any TargetPassConfig methods.

- Without any llc options, no scheduler is run.

- With -enable-misched, the standard machine scheduler is run and honors the -misched=... flag to select the scheduler variant, which may be used for performance evaluation or testing.

Sorry overridePass is ugly. I haven't thought of a better way without replacing the cl::opt framework. I hope to do that one day...

I haven't figured out why CodeGen uses char& for pass IDs. AnalysisID is much easier to use and less bug prone. I'm using it wherever I can for internal implementation. Maybe later we can change the global pass ID definitions as well.

llvm-svn: 150563
2012-02-15 03:21:51 +00:00
Andrew Trick c9ce9d2315 Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes.
llvm-svn: 150562
2012-02-15 03:21:47 +00:00
Andrew Trick 031b38b8b2 comment
llvm-svn: 150561
2012-02-15 03:21:43 +00:00
Richard Smith d3cf238e26 If a static data member of a class template which could be used in a constant
expression is referenced, defined, then referenced again, make sure we
instantiate it the second time it's referenced. This is the static data member
analogue of r150518.

llvm-svn: 150560
2012-02-15 02:42:50 +00:00
Enrico Granata 1422d6760c adding a new test case for the SB formatters API
llvm-svn: 150559
2012-02-15 02:36:32 +00:00
Enrico Granata 061858ce61 <rdar://problem/10062621>
New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association.
This provides SB classes for each of the main object types involved in providing formatter support:
 SBTypeCategory
 SBTypeFilter
 SBTypeFormat
 SBTypeSummary
 SBTypeSynthetic
plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions
For naming consistency, this patch also renames a lot of formatters-related classes.
Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side.
The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer.
An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes.
Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories.

llvm-svn: 150558
2012-02-15 02:34:21 +00:00
Richard Smith b228a86fcf Implement DR1454. This allows all intermediate results in constant expressions
to be core constant expressions (including pointers and references to
temporaries), and makes constexpr calculations Turing-complete. A Turing machine
simulator is included as a testcase.

This opens up the possibilty of removing CCValue entirely, and removing some
copies from the constant evaluator in the process, but that cleanup is not part
of this change.

llvm-svn: 150557
2012-02-15 02:18:13 +00:00
Anna Zaks d1ff1cbe23 [analyzer] Malloc checker: make a bit safer.
llvm-svn: 150556
2012-02-15 02:12:00 +00:00
Richard Smith 19582e85bd Fix typo in r150549.
llvm-svn: 150555
2012-02-15 02:07:05 +00:00
Sean Callanan f673e769a6 Previoously the expression parser had to rely on the
JIT when printing the values of registers (e.g.,
"expr $pc").  Now the expression parser can do this
in the IR interpreter without running code in the
inferior process.

llvm-svn: 150554
2012-02-15 01:40:39 +00:00
Lang Hames 84f454ec5c Don't emit live ranges for physregs live-ins that are dead.
llvm-svn: 150553
2012-02-15 01:31:10 +00:00
Lang Hames 77d205152a Disentangle moving a machine instr from updating LiveIntervals.
llvm-svn: 150552
2012-02-15 01:23:52 +00:00
John McCall c62bb39142 Split reinterpret_casts of member pointers out from CK_BitCast; this
is general goodness because representations of member pointers are
not always equivalent across member pointer types on all ABIs
(even though this isn't really standard-endorsed).

Take advantage of the new information to teach IR-generation how
to do these reinterprets in constant initializers.  Make sure this
works when intermingled with hierarchy conversions (although
this is not part of our motivating use case).  Doing this in the
constant-evaluator would probably have been better, but that would
require a *lot* of extra structure in the representation of
constant member pointers:  you'd really have to track an arbitrary
chain of hierarchy conversions and reinterpretations in order to
get this right.  Ultimately, this seems less complex.  I also
wasn't quite sure how to extend the constant evaluator to handle
foldings that we don't actually want to treat as extended
constant expressions.

llvm-svn: 150551
2012-02-15 01:22:51 +00:00
Pete Cooper 4dd0963d56 Added hook to let targets custom lower splitting of illegal vectors
llvm-svn: 150550
2012-02-15 00:55:31 +00:00
Douglas Gregor 3009383b9f Implement indexing support for lambdas in libclang (both kinds), as
well as improving the RecursiveASTVisitor's walk of lambda
expressions.

llvm-svn: 150549
2012-02-15 00:54:55 +00:00
Fariborz Jahanian fdc06e32cf modern objective-c translator: start writing the main class
meta-data.

llvm-svn: 150548
2012-02-15 00:50:11 +00:00
Nick Kledzik af18a2b29f use llvm::DenseMap instead of std::map
llvm-svn: 150547
2012-02-15 00:50:07 +00:00
Howard Hinnant 9741d6c96e Implement a few optimizations for vector push_back and insert. Fixes r10828365.
llvm-svn: 150542
2012-02-15 00:41:34 +00:00
Nick Kledzik 49d6cc8457 (no commit message)
llvm-svn: 150539
2012-02-15 00:38:09 +00:00
Chad Rosier f0687634c3 Use a temporary variable, rather then a series of redundant calls.
llvm-svn: 150538
2012-02-15 00:36:26 +00:00
Pete Cooper c21ebf5c41 Stop custom lowering forr x86 DEC64m from happening if the load in the lowered sequence has more than 1 user
llvm-svn: 150537
2012-02-15 00:33:37 +00:00
Chad Rosier dccc4794e6 Use a temporary variable, rather then a series of redundant calls.
llvm-svn: 150536
2012-02-15 00:23:55 +00:00
Anna Zaks a432feaf26 [analyzer] Add the Malloc checker to the list of tested checkers.
llvm-svn: 150535
2012-02-15 00:19:07 +00:00
Anna Zaks 5a6213d22b [analyzer] Malloc Checker: Add another false positive as a todo test.
llvm-svn: 150534
2012-02-15 00:11:28 +00:00
Anna Zaks ac06814d2f [analyzer] Malloc Checker: add support for reallocf, which always frees
the passed in pointer on failure.

llvm-svn: 150533
2012-02-15 00:11:25 +00:00
Anna Zaks d51574850e [analyzer] Malloc Checker: add support for valloc + minor code
hardening.

llvm-svn: 150532
2012-02-15 00:11:22 +00:00
Jakob Stoklund Olesen c4cf13f791 Fix global live range splitting regmask accuracy.
Pretend that regmask interference ends at the 'dead' slot, even when
there is other interference ending at the 'reg' slot of the same
instruction.

llvm-svn: 150531
2012-02-14 23:53:23 +00:00
Jakob Stoklund Olesen b0c0d340f8 Fix details in local live range splitting with regmasks.
Perform all comparisons at instruction granularity, and make sure
register masks on uses count in both gaps.

llvm-svn: 150530
2012-02-14 23:51:27 +00:00
Jakob Stoklund Olesen e7d3f441b5 Handle regmasks in findRegisterDefOperandIdx().
Only accept register masks when looking for an 'overlapping' def. When
Overlap is not set, the function searches for a proper definition of
Reg.

This means MI->modifiesRegister() considers register masks, but
MI->definesRegister() doesn't.

llvm-svn: 150529
2012-02-14 23:49:37 +00:00
Jakob Stoklund Olesen fab5201e22 Use the proper clobber check in handleLiveInRegister().
When a physreg is live in to a basic block, look for any instruction in
the block that clobbers the physreg.

The instruction doesn't have to properly redefine the register, any
overlapping clobber is OK.

This slightly changes live ranges when compiling with register masks.

llvm-svn: 150528
2012-02-14 23:46:24 +00:00
Jakob Stoklund Olesen 20d25a7f40 Dump live intervals in numerical order.
The old DenseMap hashed order was very confusing.

llvm-svn: 150527
2012-02-14 23:46:21 +00:00
Richard Smith 9bd64f90e2 Extend all-std-headers.cpp to include C++11 headers when building in C++11 mode.
Conditionally include headers which older STL implementations don't provide.

llvm-svn: 150526
2012-02-14 23:06:14 +00:00
Lang Hames e64294ef84 Don't create a new copy of reserved regs - we already have one handy.
llvm-svn: 150525
2012-02-14 23:06:12 +00:00