Commit Graph

112794 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes ff8d8a830e Fix PR10845. SUBREG_TO_REG shouldn't be used when the input and
destination types are equal!

llvm-svn: 139553
2011-09-12 22:59:23 +00:00
Andrew Trick a8315c3f2b indvars test only relevant for -enable-iv-rewrite.
Otherwise this case is now covered by no-iv-rewrite.ll.

llvm-svn: 139552
2011-09-12 22:59:00 +00:00
Chad Rosier c0f3e383c9 [driver] Ignore the '--' option, rather then fail. Do so to match gcc's
behavior.
rdar://10110352 and PR10908

llvm-svn: 139551
2011-09-12 22:43:01 +00:00
Anna Zaks ea8f5725c5 [analyzer] CmpRuns can now optionally delete empty reports.
llvm-svn: 139550
2011-09-12 22:40:36 +00:00
Owen Anderson 1b7090c9b3 Fix a failing ELF Thumb test. I _think_ this is right, but it's not totally clear to me what this test is doing. Could someone on an ELF platform check?
llvm-svn: 139549
2011-09-12 22:40:31 +00:00
Caitlin Sadowski eecd273951 Thread safety: small formatting change
llvm-svn: 139548
2011-09-12 22:28:41 +00:00
Argyrios Kyrtzidis 01e3c590ae [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl of
a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast,
since the implicit cast is the one that is invisible in source code.

llvm-svn: 139547
2011-09-12 22:17:26 +00:00
Bill Wendling ac5a883624 Introduce a bit of a hack.
Splitting a landing pad takes considerable care because of PHIs and other
nasties. The problem is that the jump table needs to jump to the landing pad
block. However, the landing pad block can be jumped to only by an invoke
instruction. So we clone the landingpad instruction into its own basic block,
have the invoke jump to there. The landingpad instruction's basic block's
successor is now the target for the jump table.

But because of PHI nodes, we need to create another basic block for the jump
table to jump to. This is definitely a hack, because the values for the PHI
nodes may not be defined on the edge from the jump table. But that's okay,
because the jump table is simply a construct to mimic what is happening in the
CFG. So the values are mysteriously there, even though there is no value for the
PHI from the jump table's edge (hence calling this a hack).

llvm-svn: 139545
2011-09-12 21:56:59 +00:00
Ivan Krasin 5021af51d9 gold plugin: don't report error on non-bitcode (e.g. ELF) files.
llvm-svn: 139544
2011-09-12 21:47:50 +00:00
Anna Zaks b80d836137 [analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
llvm-svn: 139543
2011-09-12 21:32:41 +00:00
Owen Anderson 2a206c44b7 Thumb2 POP's don't allow the PC as an operand, and PUSH's don't allow the SP either.
llvm-svn: 139542
2011-09-12 21:28:46 +00:00
Bruno Cardoso Lopes 973d2921e8 Revert the wrong part of r139528, and fix testcases.
llvm-svn: 139541
2011-09-12 21:24:07 +00:00
Anna Zaks 03f3598ff1 Rename CmpRuns into CmpRuns.py so that it could be used as a module.
llvm-svn: 139540
2011-09-12 21:07:18 +00:00
Douglas Gregor 1e44e02292 Introduce a cc1-level option to provide the path to the module cache,
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.

llvm-svn: 139538
2011-09-12 20:41:59 +00:00
Owen Anderson 4a9eb5f8dc Fix encoding of PC-relative LDRSHW with an immediate offset.
llvm-svn: 139537
2011-09-12 20:36:51 +00:00
Andrew Trick d2e61e1f70 Conditionalize indvars tests that rely on SCEV expansion of geps,
which is relevant with canonical IVs. Anything else being checked by
these tests is already covered by early CSE.

llvm-svn: 139535
2011-09-12 20:26:34 +00:00
Johnny Chen 926d086e9b Fix indentations, add some comments.
llvm-svn: 139534
2011-09-12 20:25:57 +00:00
Eli Friedman 7c5dc122a0 Change a bunch of isVolatile() checks to check for atomic load/store as well.
No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic.

I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly.  I'm going to try and come up with some additional testing, though.

llvm-svn: 139533
2011-09-12 20:23:13 +00:00
Owen Anderson 3543398bcf There's no need to add additional predicate operands when converting a tB to a tBfar now. Fixes nightly test failures on armv6 Thumb. <rdar://problem/10110404>
llvm-svn: 139531
2011-09-12 20:07:22 +00:00
Eric Christopher 777c928369 Fix typo.
llvm-svn: 139530
2011-09-12 19:58:22 +00:00
Greg Clayton 98f8c5252e Added GDB/LLDB commands for the "target stop-hook add" command.
llvm-svn: 139529
2011-09-12 19:56:07 +00:00
Bruno Cardoso Lopes be7a086f58 Not sure how CMPPS and CMPPD had already ever worked, I guess it didn't.
However with this fix it does now.

Basically the operand order for the x86 target specific node
is not the same as the instruction, but since the intrinsic need that
specific order at the instruction definition, just change the order
during legalization. Also, there were some wrong invertions of condition
codes, such as GE => LE, GT => LT, fix that too. Fix PR10907.

llvm-svn: 139528
2011-09-12 19:30:40 +00:00
Bruno Cardoso Lopes f6382979f2 Organize a bit the operand names for CMPPS and CMPPD
llvm-svn: 139527
2011-09-12 19:30:36 +00:00
Bruno Cardoso Lopes 2e4bee16bb Realign BLEND patterns to match the general style for patterns in .td file.
llvm-svn: 139526
2011-09-12 19:30:33 +00:00
Bruno Cardoso Lopes 9c9f64918c Fix 80-columns
llvm-svn: 139525
2011-09-12 19:30:29 +00:00
Johnny Chen 3a9838c07b Fix a bug in OptionGroupWatchpoint.cpp where the '-w' option arg parsing result was not checked
to effect an early error return.

Plus add logic to 'frame variable' command object to check that when watchpoint option is on,
only one variable with exact name (no regex) is specified as the sole command arg.

llvm-svn: 139524
2011-09-12 19:12:06 +00:00
Douglas Gregor 7bfedd69c5 Kill off an irrelevant FIXME
llvm-svn: 139523
2011-09-12 18:58:37 +00:00
Owen Anderson a9ebf6fb64 Port more encoding tests to decoding tests, and correct an improper Thumb2 pre-indexed load decoding this uncovered.
llvm-svn: 139522
2011-09-12 18:56:30 +00:00
Devang Patel b0fa5b57ac By popular demand, enumerate all builtin types!
llvm-svn: 139521
2011-09-12 18:50:21 +00:00
Richard Trieu b420bcaeb0 Refactor CheckAdditionOperands() to use early return for pointer addition.
llvm-svn: 139520
2011-09-12 18:37:54 +00:00
Douglas Gregor 41866816ce Diagnose attempt to mark function-local declarations as __module_private__.
llvm-svn: 139519
2011-09-12 18:37:38 +00:00
Andrew Trick 30e8db98b8 Removing indvars tests that directly test canonical IVs and nothing else.
llvm-svn: 139518
2011-09-12 18:33:08 +00:00
Andrew Trick 183013d8d4 Rename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for default change.
llvm-svn: 139517
2011-09-12 18:28:44 +00:00
Anna Zaks 05dda473e6 [analyzer] Simplify the test, use generic/more descriptive names.
llvm-svn: 139516
2011-09-12 18:28:35 +00:00
Devang Patel 1ad1abe165 Add asserts to keep front-ends honest while encoding debug info into LLVM IR using DIBuilder.
llvm-svn: 139515
2011-09-12 18:26:08 +00:00
Devang Patel 33e097b699 Add an assert so that new builtins do not sneak without proper debug info.
llvm-svn: 139514
2011-09-12 18:24:46 +00:00
Devang Patel ba15240e83 Update test to fix windows buildbot.
llvm-svn: 139513
2011-09-12 18:11:52 +00:00
Argyrios Kyrtzidis 14c32e8894 [libclang] In ASTUnit::Parse copy the CompilerInvocation object instead of
modifying directly for the preamble.

This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true"
would be persistent for subsequent reparses of the translation unit which would result
in defines, present in command-line but not in the PCH, being ignored.

Fixes rdar://9615399.

llvm-svn: 139512
2011-09-12 18:09:38 +00:00
Argyrios Kyrtzidis 3405baa3f0 [libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
which when set it determines the trial number after which the remapping of files should
take effect.

llvm-svn: 139511
2011-09-12 18:09:31 +00:00
Richard Trieu 993f3ab07b Fix two comments from warn to emit error to match the actual diagnostic used.
llvm-svn: 139510
2011-09-12 18:08:02 +00:00
Anna Zaks 79301b16f3 [analyzer] Fix a failure encountered while analyzing bind (radar://10105448).
llvm-svn: 139509
2011-09-12 18:07:30 +00:00
Anna Zaks 6e05e32e12 Doxygen comments.
llvm-svn: 139508
2011-09-12 17:57:20 +00:00
Anna Zaks 295208d744 [analyzer] Fix a new failure encountered while building Adium exposed as a result of r138196(radar://10087620). ObjectiveC property of type int has a value of type ObjCPropRef, which is a Loc.
llvm-svn: 139507
2011-09-12 17:56:08 +00:00
Anna Zaks 964c186ffe [analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.
llvm-svn: 139506
2011-09-12 17:48:08 +00:00
Eli Friedman 57ca95961b Fix mistake in test runline.
llvm-svn: 139505
2011-09-12 17:32:58 +00:00
Andrew Trick 8c6fb3af6e Test case for r139453, WidenIV::GetExtendedOperandRecurrence.
llvm-svn: 139504
2011-09-12 17:20:57 +00:00
Devang Patel b5a07abe94 Add DW_ATE_UTF, which clang started using in my previous commit!
llvm-svn: 139503
2011-09-12 17:18:20 +00:00
Devang Patel 98ca8aeca6 Fix debug info encodings for char16_t and char32_t.
llvm-svn: 139502
2011-09-12 17:11:58 +00:00
Jakob Stoklund Olesen 45df7e0f22 Remove the -compact-regions flag.
It has been enabled by default for a while, it was only there to allow
performance comparisons.

llvm-svn: 139501
2011-09-12 16:54:42 +00:00
Jakob Stoklund Olesen eecb2fb183 Add an interface for SplitKit complement spill modes.
SplitKit always computes a complement live range to cover the places
where the original live range was live, but no explicit region has been
allocated.

Currently, the complement live range is created to be as small as
possible - it never overlaps any of the regions.  This minimizes
register pressure, but if the complement is going to be spilled anyway,
that is not very important.  The spiller will eliminate redundant
spills, and hoist others by making the spill slot live range overlap
some of the regions created by splitting.  Stack slots are cheap.

This patch adds the interface to enable spill modes in SplitKit.  In
spill mode, SplitKit will assume that the complement is going to spill,
so it will allow it to overlap regions in order to avoid back-copies.
By doing some of the spiller's work early, the complement live range
becomes simpler.  In some cases, it can become much simpler because no
extra PHI-defs are required.  This will speed up both splitting and
spilling.

This is only the interface to enable spill modes, no implementation yet.

llvm-svn: 139500
2011-09-12 16:49:21 +00:00