Jim Ingham [Mon, 21 May 2012 23:06:47 +0000 (23:06 +0000)]
CompileUnit::ResolveSymbolContext was only filling in the LineEntry regardless of what was passed in for "resolve_scope". I fixed that.
llvm-svn: 157217
Fariborz Jahanian [Mon, 21 May 2012 22:43:44 +0000 (22:43 +0000)]
objective-c: provide a useful 'fixit' suggestion when
errornously using commas to separate ObjC message arguments.
// rdar://
11376372
llvm-svn: 157216
Owen Anderson [Mon, 21 May 2012 22:39:20 +0000 (22:39 +0000)]
Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in-tree targets exercise this path.
Patch by Micah Villmow.
llvm-svn: 157215
Sean Callanan [Mon, 21 May 2012 22:25:52 +0000 (22:25 +0000)]
Updated the object-pointer lookup logic to fix
Objective-C "self," which is not a regular pointer.
llvm-svn: 157214
Sean Callanan [Mon, 21 May 2012 22:25:12 +0000 (22:25 +0000)]
Fixed the new-syntax testcase to reflect how we
print string literals.
llvm-svn: 157213
Eric Christopher [Mon, 21 May 2012 22:13:23 +0000 (22:13 +0000)]
Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.
Testcase to follow.
Part of rdar://
11457152
llvm-svn: 157212
Anna Zaks [Mon, 21 May 2012 22:07:00 +0000 (22:07 +0000)]
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
(ex: float).
llvm-svn: 157211
Enrico Granata [Mon, 21 May 2012 21:52:38 +0000 (21:52 +0000)]
Fixes for performance to data formatters - Python < 3.0 is much slower when using True/False as compared to 1/0 for logical values. Wexploit this to our advantage. Other minor tweaks
llvm-svn: 157209
Sean Callanan [Mon, 21 May 2012 21:29:52 +0000 (21:29 +0000)]
Fixed a nasty bug where JIT expressions didn't work
when stopped in a const method. Also updated our
testsuite to ensure that JIT is forced in this case.
llvm-svn: 157208
Rafael Espindola [Mon, 21 May 2012 20:31:27 +0000 (20:31 +0000)]
Function template version of the previous patch.
llvm-svn: 157207
Rafael Espindola [Mon, 21 May 2012 20:15:56 +0000 (20:15 +0000)]
Produce a hidden symbol for zed in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct HIDDEN bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
Before we would produce a hidden symbol in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
But adding HIDDEN to the specialization would cause us to produce a default
symbol.
llvm-svn: 157206
Argyrios Kyrtzidis [Mon, 21 May 2012 20:11:54 +0000 (20:11 +0000)]
[driver] When creating the compiler invocation out of command-line
arguments, force use of clang frontend for the driver.
Fixes rdar://
11356765.
llvm-svn: 157205
Benjamin Kramer [Mon, 21 May 2012 19:40:38 +0000 (19:40 +0000)]
Analyzer: Fix PR12905, a crash when encountering a call to a function named "C".
While there clean up indentation.
llvm-svn: 157204
Sean Callanan [Mon, 21 May 2012 18:25:19 +0000 (18:25 +0000)]
Added an "rb" alias that sets breakpoints by
regular expression.
llvm-svn: 157202
Jim Grosbach [Mon, 21 May 2012 17:57:17 +0000 (17:57 +0000)]
Thumb2: RSB source register should be rGRP not GPRnopc.
t2RSB defined the operand correctly, but tRSBS didn't.
llvm-svn: 157200
Sean Callanan [Mon, 21 May 2012 17:54:55 +0000 (17:54 +0000)]
Integrated a check into Clang that make sure that
it doesn't try to call LookupDestructor on an
incomplete class.
llvm-svn: 157199
Argyrios Kyrtzidis [Mon, 21 May 2012 17:48:31 +0000 (17:48 +0000)]
[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error".
Per feedback from John this is useful to have in general.
llvm-svn: 157198
Dan Gohman [Mon, 21 May 2012 17:41:28 +0000 (17:41 +0000)]
Mark an unreachable region of code with llvm_unreachable.
llvm-svn: 157197
Dmitry Vyukov [Mon, 21 May 2012 17:39:40 +0000 (17:39 +0000)]
tsan: implement malloc/free hooks
llvm-svn: 157196
Chad Rosier [Mon, 21 May 2012 17:13:41 +0000 (17:13 +0000)]
Typo.
llvm-svn: 157195
Fariborz Jahanian [Mon, 21 May 2012 17:10:28 +0000 (17:10 +0000)]
Remove unused argument in my last patch.
llvm-svn: 157194
Fariborz Jahanian [Mon, 21 May 2012 17:02:43 +0000 (17:02 +0000)]
objective-c: When default synthesizing readonly IBOutlet properties
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://
11448209
llvm-svn: 157193
Sean Callanan [Mon, 21 May 2012 17:01:59 +0000 (17:01 +0000)]
Added a GDB equivalent for saving binary memory
data.
llvm-svn: 157192
Owen Anderson [Mon, 21 May 2012 16:57:17 +0000 (16:57 +0000)]
Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.
Patch by Jose Fonseca.
llvm-svn: 157191
Enrico Granata [Mon, 21 May 2012 16:51:35 +0000 (16:51 +0000)]
<rdar://problem/
11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.
llvm-svn: 157190
Timur Iskhodzhanov [Mon, 21 May 2012 14:25:36 +0000 (14:25 +0000)]
[ASan] Make for-Windows RTL compileable using Clang++
llvm-svn: 157188
Dmitry Vyukov [Mon, 21 May 2012 14:24:20 +0000 (14:24 +0000)]
tsan: do not assume non-recursive signal handlers
llvm-svn: 157187
Rafael Espindola [Mon, 21 May 2012 14:22:37 +0000 (14:22 +0000)]
Test and document a difference from gcc in the handling of visibility
attributes.
llvm-svn: 157186
Patrik Hägglund [Mon, 21 May 2012 13:18:06 +0000 (13:18 +0000)]
test commit
llvm-svn: 157184
Stepan Dyatkovskiy [Mon, 21 May 2012 10:44:40 +0000 (10:44 +0000)]
PR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) related changes for Execution and Verifier.
llvm-svn: 157183
Benjamin Kramer [Mon, 21 May 2012 10:42:01 +0000 (10:42 +0000)]
Unpack enums in CodeCompletetionResult.
In theory they should be wide enough even when the enum type is signed, but it
looks like MSVC9 still has problems with it.
llvm-svn: 157182
Dmitry Vyukov [Mon, 21 May 2012 10:20:53 +0000 (10:20 +0000)]
tsan: replace CHECK with CHECK_EQ for better diagnostics
llvm-svn: 157181
Dmitry Vyukov [Mon, 21 May 2012 08:26:51 +0000 (08:26 +0000)]
tsan: better, more realistic handling of signals
llvm-svn: 157178
Dmitry Vyukov [Mon, 21 May 2012 06:46:27 +0000 (06:46 +0000)]
tsan: add more checks for OOM conditions
tests like to try to malloc((size_t)-1)
llvm-svn: 157176
Craig Topper [Mon, 21 May 2012 06:40:16 +0000 (06:40 +0000)]
Allow 256-bit shuffles to still be split even if only half of the shuffle comes from two 128-bit pieces.
llvm-svn: 157175
Jakob Stoklund Olesen [Mon, 21 May 2012 03:11:23 +0000 (03:11 +0000)]
Give a small negative bias to giant edge bundles.
This helps compile time when the greedy register allocator splits live
ranges in giant functions. Without the bias, we would try to grow
regions through the giant edge bundles, usually to find out that the
region became too big and expensive.
If a live range has many uses in blocks near the giant bundle, the small
negative bias doesn't make a big difference, and we still consider
regions including the giant edge bundle.
Giant edge bundles are usually connected to landing pads or indirect
branches.
llvm-svn: 157174
Peter Collingbourne [Sun, 20 May 2012 23:28:41 +0000 (23:28 +0000)]
Teach Clang about the NVPTX backend.
llvm-svn: 157173
Peter Collingbourne [Sun, 20 May 2012 23:28:36 +0000 (23:28 +0000)]
Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.
llvm-svn: 157172
Peter Collingbourne [Sun, 20 May 2012 23:28:32 +0000 (23:28 +0000)]
CUDA: the device and host attributes must be inheritable, in order
to deal with NVIDIA's headers. We'll need to think of another way
to handle multiple host/device definitions within the same TU.
llvm-svn: 157171
NAKAMURA Takumi [Sun, 20 May 2012 22:28:03 +0000 (22:28 +0000)]
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.
llvm-svn: 157170
Jakob Stoklund Olesen [Sun, 20 May 2012 21:41:05 +0000 (21:41 +0000)]
Clear kill flags on the fly when joining intervals.
With physreg joining out of the way, it is easy to recognize the
instructions that need their kill flags cleared while testing for
interference.
This allows us to skip the final scan of all instructions for an 11%
speedup of the coalescer pass.
llvm-svn: 157169
Peter Collingbourne [Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)]
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0. This relies on address
space 0 being a unified address space.
llvm-svn: 157167
Nick Lewycky [Sun, 20 May 2012 20:30:47 +0000 (20:30 +0000)]
Add RPO to the lexicon.
llvm-svn: 157166
Jakob Stoklund Olesen [Sun, 20 May 2012 18:43:00 +0000 (18:43 +0000)]
Make the global base reg GR32_NOSP.
It can sometimes be used in addressing modes that don't support %ESP.
llvm-svn: 157165
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:55 +0000 (18:42 +0000)]
Constrain regclasses in PeepholeOptimizer.
It can be necessary to restrict to a sub-class before accessing
sub-registers.
llvm-svn: 157164
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:51 +0000 (18:42 +0000)]
Constrain register classes in TailDup.
When rewriting operands, make sure the new registers have a compatible
register class.
llvm-svn: 157163
Peter Collingbourne [Sun, 20 May 2012 18:36:15 +0000 (18:36 +0000)]
When legalising shifts, do not pre-build a list of operands which
may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve
the other operands when calling UpdateNodeOperands. Fixes PR12889.
llvm-svn: 157162
Benjamin Kramer [Sun, 20 May 2012 18:10:42 +0000 (18:10 +0000)]
Emit memcmp directly from the StringMatcherEmitter.
There should be no difference in the resulting binary, given a sufficiently
smart compiler. However we already had compiler timeouts on the generated
code in Intrinsics.gen, this hopefully makes the lives of slow buildbots a
little easier.
llvm-svn: 157161
Benjamin Kramer [Sun, 20 May 2012 17:24:08 +0000 (17:24 +0000)]
Plug a leak when using MCJIT.
Found by valgrind.
llvm-svn: 157160
Hal Finkel [Sun, 20 May 2012 17:11:24 +0000 (17:11 +0000)]
Add a missing PPC 64-bit stwu pattern.
This seems to fix the remaining compile-time failures on PPC64 when
compiling with -enable-ppc-preinc.
llvm-svn: 157159
Benjamin Kramer [Sun, 20 May 2012 14:19:46 +0000 (14:19 +0000)]
Bitpack CodeCompletionResults.
llvm-svn: 157158
Howard Hinnant [Sun, 20 May 2012 13:03:53 +0000 (13:03 +0000)]
Add documentation regarding -fno-rtti.
llvm-svn: 157157
Benjamin Kramer [Sun, 20 May 2012 11:24:27 +0000 (11:24 +0000)]
Use TargetMachine's register info instead of creating a new one and leaking it.
llvm-svn: 157155
Jakob Stoklund Olesen [Sun, 20 May 2012 06:43:46 +0000 (06:43 +0000)]
Fix test for 32-bit hosts.
llvm-svn: 157154
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:47 +0000 (06:38 +0000)]
Use the right register class for LDRrs.
llvm-svn: 157152
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:42 +0000 (06:38 +0000)]
Transfer memory operands to the right instruction.
They need to go on the PICLDR as the verifier points out.
llvm-svn: 157151
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:37 +0000 (06:38 +0000)]
Properly constrain register classes for sub-registers.
Not all GR64 registers have sub_8bit sub-registers.
llvm-svn: 157150
Jakob Stoklund Olesen [Sun, 20 May 2012 06:38:32 +0000 (06:38 +0000)]
Properly constrain register classes in 2-addr.
X86 has 2-addr instructions with different constraints on the tied def
and use operands. One is GR32, one is GR32_NOSP.
llvm-svn: 157149
Jakob Stoklund Olesen [Sun, 20 May 2012 05:28:53 +0000 (05:28 +0000)]
Missed a push_back in r157147.
llvm-svn: 157148
Jakob Stoklund Olesen [Sun, 20 May 2012 04:52:48 +0000 (04:52 +0000)]
Avoid deleting extra copies when RegistersDefinedFromSameValue is true.
This function adds copies to be erased to DupCopies, avoid also adding
them to DeadCopies.
llvm-svn: 157147
Jakob Stoklund Olesen [Sun, 20 May 2012 03:57:12 +0000 (03:57 +0000)]
Fix build bots.
Avoid looking at the operands of a potentially erased instruction.
llvm-svn: 157146
Jakob Stoklund Olesen [Sun, 20 May 2012 02:54:52 +0000 (02:54 +0000)]
LiveRangeQuery simplifies shrinkToUses().
llvm-svn: 157145
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:38 +0000 (02:44 +0000)]
Use LiveRangeQuery in ScheduleDAGInstrs.
llvm-svn: 157144
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:36 +0000 (02:44 +0000)]
Eliminate some uses of struct LiveRange.
That struct ought to be a LiveInterval implementation detail.
llvm-svn: 157143
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:33 +0000 (02:44 +0000)]
Use LiveRangeQuery instead of getLiveRangeContaining().
llvm-svn: 157142
Jakob Stoklund Olesen [Sun, 20 May 2012 02:44:30 +0000 (02:44 +0000)]
Add a LiveRangeQuery class.
This class is meant to be the primary interface for examining a live
range in the vicinity on a given instruction. It avoids all the messy
dealings with iterators and early clobbers.
This is a more abstract interface to live ranges, hiding the
implementation as a vector of segments.
llvm-svn: 157141
Peter Collingbourne [Sun, 20 May 2012 01:32:09 +0000 (01:32 +0000)]
Do not pass an invalid domtree to SimplifyInstruction from
LoopUnswitch. Fixes PR12887.
llvm-svn: 157140
Nico Weber [Sun, 20 May 2012 01:27:21 +0000 (01:27 +0000)]
Error when using typeid() with -fno-rtti. PR 12888.
llvm-svn: 157139
Eli Friedman [Sun, 20 May 2012 00:46:05 +0000 (00:46 +0000)]
Zap a bogus assert for delegating constructors. PR12890, part 2.
I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.
llvm-svn: 157138
Jakob Stoklund Olesen [Sat, 19 May 2012 23:59:27 +0000 (23:59 +0000)]
Simplify overlap check.
llvm-svn: 157137
Eli Friedman [Sat, 19 May 2012 23:35:23 +0000 (23:35 +0000)]
Make delegating initializers use a similar codepath to base initializers in dependent contexts. PR12890.
llvm-svn: 157136
Jakob Stoklund Olesen [Sat, 19 May 2012 23:34:59 +0000 (23:34 +0000)]
Fix 12892.
Dead code elimination during coalescing could cause a virtual register
to be split into connected components. The following rewriting would be
confused about the already joined copies present in the code, but
without a corresponding value number in the live range.
Erase all joined copies instantly when joining intervals such that the
MI and LiveInterval representations are always in sync.
llvm-svn: 157135
Peter Collingbourne [Sat, 19 May 2012 22:52:10 +0000 (22:52 +0000)]
Do not eliminate allocas whose alignment exceeds that of the
copied-in constant, as a subsequent user may rely on over alignment.
Fixes PR12885.
llvm-svn: 157134
Hal Finkel [Sat, 19 May 2012 21:52:55 +0000 (21:52 +0000)]
Add a FIXME about access to negative stack-pointer offsets on PPC32.
The current code will generate a prologue which starts with something like:
mflr 0
stw 31, -4(1)
stw 0, 4(1)
stwu 1, -16(1)
But under the PPC32 SVR4 ABI, access to negative offsets from R1 is not allowed.
This was pointed out by Peter Bergner.
llvm-svn: 157133
Jakob Stoklund Olesen [Sat, 19 May 2012 21:02:31 +0000 (21:02 +0000)]
Remove the late DCE in RegisterCoalescer.
Dead code and joined copies are now eliminated on the fly, and there is
no need for a post pass.
This makes the coalescer work like other modern register allocator
passes: Code is changed on the fly, there is no pending list of changes
to be committed.
llvm-svn: 157132
Jakob Stoklund Olesen [Sat, 19 May 2012 20:54:07 +0000 (20:54 +0000)]
Erase joined copies immediately.
The late dead code elimination is no longer necessary.
The test changes are cause by a register hint that can be either %rdi or
%rax. The choice depends on the use list order, which this patch changes.
llvm-svn: 157131
Jakob Stoklund Olesen [Sat, 19 May 2012 20:54:03 +0000 (20:54 +0000)]
Fix an ancient bug in removeCopyByCommutingDef().
Before rewriting uses of one value in A to register B, check that there
are no tied uses. That would require multiple A values to be rewritten.
This bug can't bite in the current version of the code for a fairly
subtle reason: A tied use would have caused 2-addr to insert a copy
before the use. If the copy has been coalesced, it will be found by the
same loop changed by this patch, and the optimization is aborted.
This was exposed by 400.perlbench and lua after applying a patch that
deletes joined copies aggressively.
llvm-svn: 157130
Nadav Rotem [Sat, 19 May 2012 20:30:08 +0000 (20:30 +0000)]
On Haswell, perfer storing YMM registers using a single instruction.
llvm-svn: 157129
Howard Hinnant [Sat, 19 May 2012 20:20:49 +0000 (20:20 +0000)]
Revert fix to llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included in the code comment.
llvm-svn: 157128
Nadav Rotem [Sat, 19 May 2012 19:57:37 +0000 (19:57 +0000)]
Add support for additional in-reg vbroadcast patterns
llvm-svn: 157127
Benjamin Kramer [Sat, 19 May 2012 19:32:11 +0000 (19:32 +0000)]
Disambiguate call to operator==.
clang++ and msvc happily had no problem with it but g++ refuses to compile.
llvm-svn: 157126
Jakob Stoklund Olesen [Sat, 19 May 2012 19:25:00 +0000 (19:25 +0000)]
Collect inflatable virtual registers on the fly.
There is no reason to defer the collection of virtual registers whose
register class may be replaced with a larger class.
llvm-svn: 157125
Benjamin Kramer [Sat, 19 May 2012 19:15:32 +0000 (19:15 +0000)]
ValueMap: Use DenseMap's find_as mechanism to reduce use list churn.
Otherwise just looking up a value in the map requires creating a VH, adding it to the use lists and destroying it again.
llvm-svn: 157124
Benjamin Kramer [Sat, 19 May 2012 19:15:25 +0000 (19:15 +0000)]
Move CallbackVHs dtor inline, it can be devirtualized in many cases. Move the other virtual methods out of line as they are only called from within Value.cpp anyway.
llvm-svn: 157123
Craig Topper [Sat, 19 May 2012 19:14:18 +0000 (19:14 +0000)]
Tidy up some spacing and inconsistent use of pre/post increment. No functional change intended.
llvm-svn: 157122
Fariborz Jahanian [Sat, 19 May 2012 18:17:17 +0000 (18:17 +0000)]
objective-c: Warn if default synthesizing readonly IBOutlet properties
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://
11448209
llvm-svn: 157121
Dmitri Gribenko [Sat, 19 May 2012 17:20:59 +0000 (17:20 +0000)]
Missing line break.
llvm-svn: 157120
Dmitri Gribenko [Sat, 19 May 2012 17:17:26 +0000 (17:17 +0000)]
Use RecordDecl::field_iterator because D1, D2 are RecordDecls. No functional change.
llvm-svn: 157119
Benjamin Kramer [Sat, 19 May 2012 16:44:12 +0000 (16:44 +0000)]
Remove extra semicolons.
llvm-svn: 157118
Benjamin Kramer [Sat, 19 May 2012 16:34:46 +0000 (16:34 +0000)]
Apparently empty names are allowed here.
llvm-svn: 157117
Benjamin Kramer [Sat, 19 May 2012 16:03:58 +0000 (16:03 +0000)]
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.
llvm-svn: 157116
Benjamin Kramer [Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)]
Inline a trivial clear() method.
llvm-svn: 157114
Benjamin Kramer [Sat, 19 May 2012 13:28:54 +0000 (13:28 +0000)]
Provide move semantics for TinyPtrVector and for DenseMap's rehash function.
This makes DenseMap<..., TinyPtrVector<...>> as cheap as it always should've been!
llvm-svn: 157113
Stepan Dyatkovskiy [Sat, 19 May 2012 13:14:30 +0000 (13:14 +0000)]
Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new SwitchInst methods.
llvm-svn: 157112
Benjamin Kramer [Sat, 19 May 2012 10:43:54 +0000 (10:43 +0000)]
Simplify code, add an assertion.
llvm-svn: 157111
Filipe Cabecinhas [Sat, 19 May 2012 09:59:08 +0000 (09:59 +0000)]
Fixes the case where we created a dummy target, deleted it, and then tried to evaluate an expression with no target.
llvm-svn: 157110
Craig Topper [Sat, 19 May 2012 08:28:17 +0000 (08:28 +0000)]
Copy some AVX support from MCJIT to JIT. Maybe will fix PR12748.
llvm-svn: 157109
Douglas Gregor [Sat, 19 May 2012 07:14:17 +0000 (07:14 +0000)]
Revert my _LIBCPP_INLINE_VISIBILITY changes, r157097 and r157107
llvm-svn: 157108
Douglas Gregor [Sat, 19 May 2012 07:01:14 +0000 (07:01 +0000)]
valarray resize should not be _LIBCPP_INLINE_VISIBILITY
llvm-svn: 157107
Jakob Stoklund Olesen [Sat, 19 May 2012 05:25:59 +0000 (05:25 +0000)]
Eliminate dead code after remat.
This will remove the original def once it has no more uses.
llvm-svn: 157104