David Blaikie [Wed, 27 Mar 2013 00:07:26 +0000 (00:07 +0000)]
Adding DIImportedModules to DIScopes.
This is just the basic groundwork for supporting DW_TAG_imported_module but I
wanted to commit this before pushing support further into Clang or LLVM so that
this rather churny change is isolated from the rest of the work. The major
churn here is obviously adding another field (within the common DIScope prefix)
to all DIScopes (files, classes, namespaces, lexical scopes, etc). This should
be the last big churny change needed for DW_TAG_imported_module/using directive
support/PR14606.
llvm-svn: 178099
John McCall [Wed, 27 Mar 2013 00:03:48 +0000 (00:03 +0000)]
Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.
llvm-svn: 178098
Ted Kremenek [Wed, 27 Mar 2013 00:02:21 +0000 (00:02 +0000)]
Split "incomplete implementation" warnings for ObjC into separate warnings.
Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes. Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.
Implements <rdar://problem/
13350414>
llvm-svn: 178097
Hal Finkel [Wed, 27 Mar 2013 00:02:20 +0000 (00:02 +0000)]
Don't spill PPC VRSAVE on non-Darwin (even in SjLj)
As Bill Schmidt pointed out to me, only on Darwin do we need to spill/restore
VRSAVE in the SjLj code. For non-Darwin, don't spill/restore VRSAVE (and I've
added some asserts to make sure that we're not).
As it turns out, we're not currently handling the Darwin case correctly (I've
added a FIXME in the test case). I've tried adding various implied register
definitions/uses to force the spill without success, so I'll need to address
this later.
llvm-svn: 178096
Douglas Gregor [Tue, 26 Mar 2013 23:59:23 +0000 (23:59 +0000)]
<rdar://problem/
13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type.
llvm-svn: 178095
Anna Zaks [Tue, 26 Mar 2013 23:58:52 +0000 (23:58 +0000)]
[analyzer] Better test for r178063.
Jordan pointed out that my previously committed test was bogus.
llvm-svn: 178094
Anna Zaks [Tue, 26 Mar 2013 23:58:49 +0000 (23:58 +0000)]
[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit.
Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr
or ExprWithCleanups.
llvm-svn: 178093
David Blaikie [Tue, 26 Mar 2013 23:47:35 +0000 (23:47 +0000)]
Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
llvm-svn: 178092
David Blaikie [Tue, 26 Mar 2013 23:46:39 +0000 (23:46 +0000)]
Make DIBuilder::createClassType more type safe by returning DICompositeType rather than DIType
llvm-svn: 178091
David Blaikie [Tue, 26 Mar 2013 23:46:36 +0000 (23:46 +0000)]
DebugInfo: more support for mutating DICompositeType to reduce magic number usage in Clang
llvm-svn: 178090
Chad Rosier [Tue, 26 Mar 2013 23:41:30 +0000 (23:41 +0000)]
[driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://
13362359
llvm-svn: 178089
Douglas Gregor [Tue, 26 Mar 2013 23:36:30 +0000 (23:36 +0000)]
<rdar://problem/
13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.
When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.
llvm-svn: 178088
Chad Rosier [Tue, 26 Mar 2013 23:35:00 +0000 (23:35 +0000)]
Add a boolean parameter to the ExecuteAndWait static function to indicated
if execution failed. ExecuteAndWait returns -1 upon an execution failure, but
checking the return value isn't sufficient because the wait command may
return -1 as well. This new parameter is to be used by the clang driver in a
subsequent commit.
Part of rdar://
13362359
llvm-svn: 178087
Chad Rosier [Tue, 26 Mar 2013 23:25:41 +0000 (23:25 +0000)]
Remove a FIXME that's not planned to be fixed. We only generated crash
diagnostics for the first failing command.
llvm-svn: 178086
Greg Clayton [Tue, 26 Mar 2013 22:52:20 +0000 (22:52 +0000)]
Cleaned up how LLDB.framework was being linked to and also how the target dependencies.
llvm-svn: 178085
Bill Wendling [Tue, 26 Mar 2013 22:47:50 +0000 (22:47 +0000)]
Use the full path when outputting the `.gcda' file.
If we compile a single source program, the `.gcda' file will be generated where
the program was executed. This isn't desirable, because that place may be at an
unpredictable place (the program could call `chdir' for instance).
Instead, we will output the `.gcda' file in the same place we output the `.gcno'
file. I.e., the directory where the executable was generated. This matches GCC's
behavior.
<rdar://problem/
13061072> & PR11809
llvm-svn: 178084
Michael Liao [Tue, 26 Mar 2013 22:47:01 +0000 (22:47 +0000)]
Add XTEST codegen support
llvm-svn: 178083
Michael Liao [Tue, 26 Mar 2013 22:46:02 +0000 (22:46 +0000)]
Add HLE target feature
llvm-svn: 178082
Douglas Gregor [Tue, 26 Mar 2013 22:43:55 +0000 (22:43 +0000)]
<rdar://problem/
13473493> Handle 'this->' insertion recovery within trailing return types.
llvm-svn: 178081
Jakob Stoklund Olesen [Tue, 26 Mar 2013 22:19:12 +0000 (22:19 +0000)]
Enable SandyBridgeModel for all modern Intel P6 descendants.
All Intel CPUs since Yonah look a lot alike, at least at the granularity
of the scheduling models. We can add more accurate models for
processors that aren't Sandy Bridge if required. Haswell will probably
need its own.
The Atom processor and anything based on NetBurst is completely
different. So are the non-Intel chips.
llvm-svn: 178080
David Blaikie [Tue, 26 Mar 2013 22:09:53 +0000 (22:09 +0000)]
Debug Info: remove use of magic numbers to tweak specific debug info metadata fields
llvm-svn: 178079
David Blaikie [Tue, 26 Mar 2013 21:59:17 +0000 (21:59 +0000)]
Debug Info: Provide a means to update the members of a composite type
This will be used to factor out some uses of magic number operand offsets
inside Clang where these fields were updated in an effort to resolve forward
declarations/circular references.
llvm-svn: 178078
Hal Finkel [Tue, 26 Mar 2013 21:50:26 +0000 (21:50 +0000)]
Restore real bit lengths on PPC register numbers
As suggested by Bill Schmidt (in reviewing r178067), use the real register
number bit lengths (which is self-documenting, and prevents using illegal
numbers), and set only the relevant bits in HWEncoding (which defaults to 0).
No functionality change intended.
llvm-svn: 178077
Enrico Granata [Tue, 26 Mar 2013 21:44:13 +0000 (21:44 +0000)]
<rdar://problem/
13339196>
The algorithm to access an item in a __NSArrayM was not reacting properly to deletions
The fix is to use a smarter formula that accounts for items shifting and the resulting notion of offsets in the table
llvm-svn: 178076
Howard Hinnant [Tue, 26 Mar 2013 21:40:54 +0000 (21:40 +0000)]
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
llvm-svn: 178075
Andrew Trick [Tue, 26 Mar 2013 21:36:39 +0000 (21:36 +0000)]
TableGen SubtargetEmitter fix to allow A9 and Swift to coexist.
Allow variants to be defined only for some processors on a target.
llvm-svn: 178074
Hal Finkel [Tue, 26 Mar 2013 21:20:15 +0000 (21:20 +0000)]
Fix the register scavenger for targets that provide custom spilling
As pointed out by Richard Sandiford, my recent updates to the register
scavenger broke targets that use custom spilling (because the new code assumed
that if there were no valid spill slots, than spilling would be impossible).
I don't have a test case, but it should be possible to create one for Thumb 1,
Mips 16, etc.
llvm-svn: 178073
Enrico Granata [Tue, 26 Mar 2013 21:13:57 +0000 (21:13 +0000)]
<rdar://problem/
13246939>
Make format uint64_t[] actually work as designed
llvm-svn: 178072
Greg Clayton [Tue, 26 Mar 2013 21:01:37 +0000 (21:01 +0000)]
Add a way to dump a ClangASTType to stdout for debugging purposes.
llvm-svn: 178071
Greg Clayton [Tue, 26 Mar 2013 21:00:56 +0000 (21:00 +0000)]
Trim the output build folder a bit to it isn't so large.
llvm-svn: 178070
Greg Clayton [Tue, 26 Mar 2013 21:00:29 +0000 (21:00 +0000)]
A few more tweaks to the python perf tests. Now there is a MemoryMeasurement.
llvm-svn: 178069
Greg Clayton [Tue, 26 Mar 2013 20:53:56 +0000 (20:53 +0000)]
Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.
llvm-svn: 178068
Hal Finkel [Tue, 26 Mar 2013 20:08:20 +0000 (20:08 +0000)]
PPC: Use HWEncoding and TRI->getEncodingValue
As pointed out by Jakob, we don't need to maintain a separate
register-numbering table. Instead we should let TableGen generate the table for
us from the information (already present) in PPCRegisterInfo.td.
TRI->getEncodingValue is now used to access register-encoding values.
No functionality change intended.
llvm-svn: 178067
NAKAMURA Takumi [Tue, 26 Mar 2013 19:42:48 +0000 (19:42 +0000)]
R600/SIMCCodeEmitter.cpp: Prune a couple of unused members, STI and Ctx. [-Wunused-private-field]
llvm-svn: 178065
Howard Hinnant [Tue, 26 Mar 2013 19:04:56 +0000 (19:04 +0000)]
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses llvm.org/bugs/show_bug.cgi?id=15576.
llvm-svn: 178064
Anna Zaks [Tue, 26 Mar 2013 18:57:58 +0000 (18:57 +0000)]
[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC methods as top level.
This allows us to better reason about(inline) small wrapper functions.
llvm-svn: 178063
Anna Zaks [Tue, 26 Mar 2013 18:57:51 +0000 (18:57 +0000)]
[analyzer] micro optimization as per Jordan’s feedback on r177905.
llvm-svn: 178062
NAKAMURA Takumi [Tue, 26 Mar 2013 18:57:40 +0000 (18:57 +0000)]
clang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
With dosish filename, it misgenerates an improper extra entry.
!1 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX/debug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}
!8 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX\5Cdebug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}
!8 is unexpected.
llvm-svn: 178061
Hal Finkel [Tue, 26 Mar 2013 18:57:22 +0000 (18:57 +0000)]
Use multiple virtual registers in PPC CR spilling
Now that the register scavenger can support multiple spill slots, and PEI can
use virtual-register-based scavenging for multiple simultaneous registers, we
can use a virtual register for the transfer register in the CR spilling code.
This should eliminate the last place (outside of the prologue/epilogue) where
we depend on the unconditional availability of the r0 register. We will soon be
able to allocate it (in a somewhat restricted sense) as a GPR.
llvm-svn: 178060
Hal Finkel [Tue, 26 Mar 2013 18:57:20 +0000 (18:57 +0000)]
Update PPCRegisterInfo's use of virtual registers to be SSA
PPC's use of PEI's virtual-register-based scavenging functionality had
redefined the virtual registers (it was non-SSA). Now that PEI supports
dealing with instructions with multiple virtual registers, this can be
cleanup up to use multiple virtual registers and keep SSA form.
No functionality change intended.
llvm-svn: 178059
Hal Finkel [Tue, 26 Mar 2013 18:56:54 +0000 (18:56 +0000)]
Update PEI's virtual-register-based scavenging to support multiple simultaneous mappings
The previous algorithm could not deal properly with scavenging multiple virtual
registers because it kept only one live virtual -> physical mapping (and
iterated through operands in order). Now we don't maintain a current mapping,
but rather use replaceRegWith to completely remove the virtual register as
soon as the mapping is established.
In order to allow the register scavenger to return a physical register killed
by an instruction for definition by that same instruction, we now call
RS->forward(I) prior to eliminating virtual registers defined in I. This
requires a minor update to forward to ignore virtual registers.
These new features will be tested in forthcoming commits.
llvm-svn: 178058
Enrico Granata [Tue, 26 Mar 2013 18:55:08 +0000 (18:55 +0000)]
Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map
llvm-svn: 178057
Greg Clayton [Tue, 26 Mar 2013 18:42:13 +0000 (18:42 +0000)]
Don't crash when we have an element size of zero.
llvm-svn: 178056
Rafael Espindola [Tue, 26 Mar 2013 18:41:47 +0000 (18:41 +0000)]
Remove useGlobalsForAutomaticVariables.
It is unused since pic support went away.
llvm-svn: 178055
Reid Kleckner [Tue, 26 Mar 2013 18:30:28 +0000 (18:30 +0000)]
[ms-cxxabi] Give the MS inheritance attributes a base class
Required making a handful of changes to the table generator. Also adds
an unspecified inheritance attribute. This opens the path for us to
apply these attributes to C++ records implicitly.
llvm-svn: 178054
Manman Ren [Tue, 26 Mar 2013 18:29:15 +0000 (18:29 +0000)]
Fix uninitialized read of CalleeWithThisReturn.
Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.
PR15598
llvm-svn: 178053
Jim Ingham [Tue, 26 Mar 2013 18:29:03 +0000 (18:29 +0000)]
That wasn't a typo, if the short letter option is from a non-obvious source, I capitolize it in the help as an aid to memory.
llvm-svn: 178052
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:22 +0000 (18:24 +0000)]
Annotate the remaining x86 instructions with SchedRW lists.
Now all x86 instructions that have itinerary classes also have SchedRW
lists. This is required before the new scheduling models can be used.
There are still unannotated instructions remaining, but they don't have
itinerary classes either.
llvm-svn: 178051
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:20 +0000 (18:24 +0000)]
Annotate x87 and mmx instructions with SchedRW lists.
This only covers the instructions that were given itinerary classes for
the Atom model.
llvm-svn: 178050
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:17 +0000 (18:24 +0000)]
Annotate control instructions with SchedRW lists.
This could definitely be more granular. I am not sure if it makes a
difference.
llvm-svn: 178049
Jakob Stoklund Olesen [Tue, 26 Mar 2013 18:24:15 +0000 (18:24 +0000)]
Annotate the rest of X86InstrInfo.td with SchedRW lists.
llvm-svn: 178048
John Thompson [Tue, 26 Mar 2013 18:17:28 +0000 (18:17 +0000)]
Revised per review comments to rename test files and rearrange input files.
llvm-svn: 178047
Michael Liao [Tue, 26 Mar 2013 18:15:45 +0000 (18:15 +0000)]
Fix PRFCHW test on non-x86 builds
- 'prefetch' intrinsics are only lowered when SSE is available. On non-X86
builds, 'generic' CPU is used and stops lowering any prefetch intrinsics.
llvm-svn: 178046
Arnold Schwaighofer [Tue, 26 Mar 2013 18:07:53 +0000 (18:07 +0000)]
BasicAA: Only query twice if the result of the more general query was MayAlias
This is a compile time optimization. Before the patch we would do two traversals
on each call to aliasGEP - one with a set size parameter one with UnknownSize.
We can do better by first checking the result of the alias query with
UnknownSize.
Only if this one returns MayAlias do we query a second time using size and type.
This recovers an about 7% compile time regression on spec/ammp.
radar://
12349960
llvm-svn: 178045
Enrico Granata [Tue, 26 Mar 2013 18:04:53 +0000 (18:04 +0000)]
Our commands that end up displaying a ValueObject as part of their workflow use OptionGroupValueObjectDisplay as their currency for deciding the final representation
ValueObjects themselves use DumpValueObjectOptions as the currency for the same purpose
The code to convert between these two units was replicated (to varying degrees of correctness) in several spots in the code
This checkin provides one and only one (and hopefully correct :-) entry point for this conversion
llvm-svn: 178044
Jim Ingham [Tue, 26 Mar 2013 18:04:40 +0000 (18:04 +0000)]
Change the stepping test to output "total time" for the step as well.
llvm-svn: 178043
Chad Rosier [Tue, 26 Mar 2013 18:01:48 +0000 (18:01 +0000)]
Fix a crasher by reporting a fatal error if we're unable to create the target
machine and one is required.
Part of rdar://
13295753
llvm-svn: 178042
Michael Liao [Tue, 26 Mar 2013 17:52:08 +0000 (17:52 +0000)]
Add PRFCHW intrinsic support
- Add head 'prfchwintrin.h' to define '_m_prefetchw' which is mapped to
LLVM/clang prefetch builtin
- Add option '-mprfchw' to enable PRFCHW feature and pre-define '__PRFCHW__'
macro
llvm-svn: 178041
Michael Liao [Tue, 26 Mar 2013 17:47:11 +0000 (17:47 +0000)]
Add PREFETCHW codegen support
- Add 'PRFCHW' feature defined in AVX2 ISA extension
llvm-svn: 178040
Sean Callanan [Tue, 26 Mar 2013 17:45:02 +0000 (17:45 +0000)]
Fixed a typo.
llvm-svn: 178039
Ulrich Weigand [Tue, 26 Mar 2013 17:30:02 +0000 (17:30 +0000)]
Add test case for commit r178031.
llvm-svn: 178038
Argyrios Kyrtzidis [Tue, 26 Mar 2013 17:17:01 +0000 (17:17 +0000)]
[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.
For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:
-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
(which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.
llvm-svn: 178037
Reid Kleckner [Tue, 26 Mar 2013 16:56:59 +0000 (16:56 +0000)]
[ms-cxxabi] Mangle vector types
Summary:
The only vector types a user can pass from MSVC code to clang code are
the ones from *mmintrin.h, so we only have to match the MSVC mangling
for these types. MSVC mangles the __m128 family of types as tag types,
which we match. For other vector types, we emit a unique tag type
mangling that won't match anything produced by MSVC.
Reviewers: rjmccall
CC: chandlerc, timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D576
llvm-svn: 178036
Greg Clayton [Tue, 26 Mar 2013 16:47:22 +0000 (16:47 +0000)]
Remove FunctionProfiler and ProfileObjectiveC action classes as they are not used.
llvm-svn: 178035
Edwin Vane [Tue, 26 Mar 2013 16:44:29 +0000 (16:44 +0000)]
Docs describing limitations of the cpp11-migrate Loop Convert Transform
Sam Panzer, author of loop convert, provided a list of limitations of the tool
to be documented. (Thanks Sam!)
The transform's limitations are now documented in the existing user doc.
Included are examples of the cases where the tool may change semantics.
Author: Jack Yang <jack.yang@intel.com>
llvm-svn: 178034
Howard Hinnant [Tue, 26 Mar 2013 15:45:56 +0000 (15:45 +0000)]
More vector debug tests.
llvm-svn: 178033
Jyotsna Verma [Tue, 26 Mar 2013 15:43:57 +0000 (15:43 +0000)]
Hexagon: Use multiclass for aslh, asrh, sxtb, sxth, zxtb and zxth.
llvm-svn: 178032
Ulrich Weigand [Tue, 26 Mar 2013 15:36:14 +0000 (15:36 +0000)]
Make InstCombineCasts.cpp:OptimizeIntToFloatBitCast endian safe.
The OptimizeIntToFloatBitCast converts shift-truncate sequences
into extractelement operations. The computation of the element
index to be used in the resulting operation is currently only
correct for little-endian targets.
This commit fixes the element index computation to be correct
for big-endian targets as well. If the target byte order is
unknown, the optimization cannot be performed at all.
llvm-svn: 178031
Jyotsna Verma [Tue, 26 Mar 2013 15:34:22 +0000 (15:34 +0000)]
Hexagon: Remove HexagonMCInst.h file. It has been replaced with MCTargetDesc/HexagonMCInst.h.
llvm-svn: 178030
Marshall Clow [Tue, 26 Mar 2013 15:28:33 +0000 (15:28 +0000)]
Fixed race conditions in thread tests; exposed by UBSan
llvm-svn: 178029
Arnold Schwaighofer [Tue, 26 Mar 2013 15:14:04 +0000 (15:14 +0000)]
Revert ARM Scheduler Model: Add resources instructions, map resources
This reverts commit r177968. It is causing failures in a local build bot.
"fatal error: error in backend: Expected a variant SchedClass"
Original commit message:
Move the CortexA9 resources into the CortexA9 SchedModel namespace. Define
resource mappings under the CortexA9 SchedModel. Define resources and mappings
for the SwiftModel.
llvm-svn: 178028
Shankar Easwaran [Tue, 26 Mar 2013 15:06:52 +0000 (15:06 +0000)]
[ELF][Hexagon] remove duplicated code
llvm-svn: 178027
Howard Hinnant [Tue, 26 Mar 2013 14:28:25 +0000 (14:28 +0000)]
Simply debug mode tests per Dmitri Gribenko's suggestion.
llvm-svn: 178026
Benjamin Kramer [Tue, 26 Mar 2013 14:17:42 +0000 (14:17 +0000)]
Remove default case from fully covered switch.
llvm-svn: 178025
Christian Konig [Tue, 26 Mar 2013 14:04:17 +0000 (14:04 +0000)]
R600/SI: improve post ISel folding
Not only fold immediates, but avoid unnecessary copies as well.
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178024
Christian Konig [Tue, 26 Mar 2013 14:04:12 +0000 (14:04 +0000)]
R600/SI: improve vector interpolation
Prevent loading M0 multiple times.
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178023
Christian Konig [Tue, 26 Mar 2013 14:04:07 +0000 (14:04 +0000)]
R600/SI: avoid unecessary subreg extraction in IMAGE_SAMPLE
Just define the address as unknown instead of VReg_32.
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178022
Christian Konig [Tue, 26 Mar 2013 14:04:02 +0000 (14:04 +0000)]
R600/SI: switch back to RegPressure scheduling
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178021
Christian Konig [Tue, 26 Mar 2013 14:03:57 +0000 (14:03 +0000)]
R600/SI: mark most intrinsics as readnone v2
They read from constant register space anyway.
v2: fix lit tests
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178020
Christian Konig [Tue, 26 Mar 2013 14:03:50 +0000 (14:03 +0000)]
R600/SI: replace WQM intrinsic
Just enable WQM when we see an LDS interpolation instruction.
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 178019
Christian Konig [Tue, 26 Mar 2013 14:03:44 +0000 (14:03 +0000)]
R600/SI: fix ELSE pseudo op handling
Restore the EXEC mask early, otherwise a copy might end up not beeing executed.
Candidate for the mesa stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178018
Joe Abbey [Tue, 26 Mar 2013 13:58:53 +0000 (13:58 +0000)]
Patch by Gordon Keiser!
If PC or SP is the destination, the disassembler erroneously failed with the
invalid encoding, despite the manual saying that both are fine.
This patch addresses failure to decode encoding T4 of LDR (A8.8.62) which is a
postindexed load, where the offset 0xc is applied to SP after the load occurs.
llvm-svn: 178017
Howard Hinnant [Tue, 26 Mar 2013 13:48:57 +0000 (13:48 +0000)]
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
llvm-svn: 178016
Evgeniy Stepanov [Tue, 26 Mar 2013 13:44:29 +0000 (13:44 +0000)]
Fix uninitialized read of CalleeWithThisReturn.
CalleeWithThisReturn can be left initialized if HasThisReturn() is false.
This change reverses the order of checks in EmitFunctionEpilog such that
CalleeWithThisReturn is only examined when it has a meaningful value.
Found with MemorySanitizer.
llvm-svn: 178015
Alexey Samsonov [Tue, 26 Mar 2013 13:06:12 +0000 (13:06 +0000)]
[ASan] Change the ABI of __asan_before_dynamic_init function: now it takes pointer to private string with module name. This string serves as a unique module ID in ASan runtime. compiler-rt part
llvm-svn: 178014
Alexey Samsonov [Tue, 26 Mar 2013 13:05:41 +0000 (13:05 +0000)]
[ASan] Change the ABI of __asan_before_dynamic_init function: now it takes pointer to private string with module name. This string serves as a unique module ID in ASan runtime. LLVM part
llvm-svn: 178013
Alexander Potapenko [Tue, 26 Mar 2013 13:02:11 +0000 (13:02 +0000)]
[libsanitizer] Fix the Win build.
llvm-svn: 178012
Kostya Serebryany [Tue, 26 Mar 2013 12:42:18 +0000 (12:42 +0000)]
[tsan] make memcpy_race.cc test immune to memcpy inlining
llvm-svn: 178011
Dmitry Vyukov [Tue, 26 Mar 2013 12:40:23 +0000 (12:40 +0000)]
asan/tsan: move strcasecmp() interceptor to sanitizer_common
llvm-svn: 178010
Dmitry Vyukov [Tue, 26 Mar 2013 12:07:04 +0000 (12:07 +0000)]
asan/tsan: change SANITIZER_GO to more general SANITIZER_SUPPORTS_WEAK_HOOKS
llvm-svn: 178009
Ulrich Weigand [Tue, 26 Mar 2013 10:57:16 +0000 (10:57 +0000)]
PowerPC: Mark patterns as isCodeGenOnly.
There remain a number of patterns that cannot (and should not)
be handled by the asm parser, in particular all the Pseudo patterns.
This commit marks those patterns as isCodeGenOnly.
No change in generated code.
llvm-svn: 178008
Ulrich Weigand [Tue, 26 Mar 2013 10:56:47 +0000 (10:56 +0000)]
PowerPC: Simplify handling of fixups.
MCTargetDesc/PPCMCCodeEmitter.cpp current has code like:
if (isSVR4ABI() && is64BitMode())
Fixups.push_back(MCFixup::Create(0, MO.getExpr(),
(MCFixupKind)PPC::fixup_ppc_toc16));
else
Fixups.push_back(MCFixup::Create(0, MO.getExpr(),
(MCFixupKind)PPC::fixup_ppc_lo16));
This is a problem for the asm parser, since it requires knowledge of
the ABI / 64-bit mode to be set up. However, more fundamentally,
at this point we shouldn't make such distinctions anyway; in an assembler
file, it always ought to be possible to e.g. generate TOC relocations even
when the main ABI is one that doesn't use TOC.
Fortunately, this is actually completely unnecessary; that code was added
to decide whether to generate TOC relocations, but that information is in
fact already encoded in the VariantKind of the underlying symbol.
This commit therefore merges those fixup types into one, and then decides
which relocation to use based on the VariantKind.
No changes in generated code.
llvm-svn: 178007
Ulrich Weigand [Tue, 26 Mar 2013 10:56:22 +0000 (10:56 +0000)]
PowerPC: Simplify FADD in round-to-zero mode.
As part of the the sequence generated to implement long double -> int
conversions, we need to perform an FADD in round-to-zero mode. This is
problematical since the FPSCR is not at all modeled at the SelectionDAG
level, and thus there is a risk of getting floating point instructions
generated out of sequence with the instructions to modify FPSCR.
The current code handles this by somewhat "special" patterns that in part
have dummy operands, and/or duplicate existing instructions, making them
awkward to handle in the asm parser.
This commit changes this by leaving the "FADD in round-to-zero mode"
as an atomic operation on the SelectionDAG level, and only split it up into
real instructions at the MI level (via custom inserter). Since at *this*
level the FPSCR *is* modeled (via the "RM" hard register), much of the
"special" stuff can just go away, and the resulting patterns can be used by
the asm parser.
No significant change in generated code expected.
llvm-svn: 178006
Ulrich Weigand [Tue, 26 Mar 2013 10:55:45 +0000 (10:55 +0000)]
PowerPC: Remove LDrs pattern.
The LDrs pattern is a duplicate of LD, except that it accepts memory
addresses where the displacement is a symbolLo64. An operand type
"memrs" is defined for just that purpose.
However, this wouldn't be necessary if the default "memrix" operand
type were to simply accept 64-bit symbolic addresses directly.
The only problem with that is that it uses "symbolLo", which is
hardcoded to 32-bit.
To fix this, this commit changes "memri" and "memrix" to use new
operand types for the memory displacement, which allow iPTR
instead of i32. This will also make address parsing easier to
implment in the asm parser.
No change in generated code.
llvm-svn: 178005
Ulrich Weigand [Tue, 26 Mar 2013 10:55:20 +0000 (10:55 +0000)]
PowerPC: Remove ADDIL patterns.
The ADDI/ADDI8 patterns are currently duplicated into ADDIL/ADDI8L,
which describe the same instruction, except that they accept a
symbolLo[64] operand instead of a s16imm[64] operand.
This duplication confuses the asm parser, and it actually not really
needed, since symbolLo[64] already accepts immediate operands anyway.
So this commit removes the duplicate patterns.
No change in generated code.
llvm-svn: 178004
Ulrich Weigand [Tue, 26 Mar 2013 10:54:54 +0000 (10:54 +0000)]
PowerPC: Use CCBITRC operand for ISEL patterns.
This commit changes the ISEL patterns to use a CCBITRC operand
instead of a "pred" operand. This matches the actual instruction
text more directly, and simplifies use of ISEL with the asm parser.
In addition, this change allows some simplification of handling
the "pred" operand, as this is now only used by BCC.
No change in generated code.
llvm-svn: 178003
Ulrich Weigand [Tue, 26 Mar 2013 10:53:27 +0000 (10:53 +0000)]
PowerPC: Simplify BLR pattern.
The BLR pattern cannot be recognized by the asm parser in its current form.
This complexity is due to an apparent attempt to enable conditional BLR
variants. However, none of those can ever be generated by current code;
the pattern is only ever created using the default "pred" operand.
To simplify the pattern and allow it to be recognized by the parser,
this commit removes those attempts at conditional BLR support.
When we later come back to actually add real conditional BLR, this
should probably be done via a fully generic conditional branch pattern.
No change in generated code.
llvm-svn: 178002
Ulrich Weigand [Tue, 26 Mar 2013 10:53:03 +0000 (10:53 +0000)]
PowerPC: Move some 64-bit branch patterns.
In PPCInstr64Bit.td, some branch patterns appear in a different sequence
than the corresponding 32-bit patterns in PPCInstrInfo.td.
To simplify future changes that affect both files, this commit moves
those patterns to rearrange them into a similar sequence.
No effect on generated code.
llvm-svn: 178001
Alexander Potapenko [Tue, 26 Mar 2013 10:34:37 +0000 (10:34 +0000)]
[libsanitizer] Unmapping the old cache partially invalidates the memory layout, so add
a flag to skip cache update for cases when that's unacceptable (e.g. lsan).
Patch by Sergey Matveev (earthdok@google.com)
llvm-svn: 178000
Christian Konig [Tue, 26 Mar 2013 10:24:20 +0000 (10:24 +0000)]
R600: fix DenseMap with pointer key iteration in the structurizer
Use a MapVector on types where the iteration order matters.
Otherwise we doesn't always produce a deterministic output.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 177999