Anna Zaks [Fri, 22 Feb 2013 02:59:24 +0000 (02:59 +0000)]
[analyzer] Place all inlining policy checks into one palce
Previously, we had the decisions about inlining spread out
over multiple functions.
In addition to the refactor, this commit ensures
that we will always inline BodyFarm functions as long as the Decl
is available. This fixes false positives due to those functions
not being inlined when no or minimal inlining is enabled such (as
shallow mode).
llvm-svn: 175857
Enrico Granata [Fri, 22 Feb 2013 02:21:10 +0000 (02:21 +0000)]
Using __package__ and __name__ seems redundant - __name__ should always contain the fully qualified module name
llvm-svn: 175856
Richard Smith [Fri, 22 Feb 2013 01:59:51 +0000 (01:59 +0000)]
Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,
to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting
levels for parentheses, brackets and braces.
Some code with heavy macro use exceeds the default limit of 256, but we don't
want to increase it generally to avoid stack overflow on stack-constrained
systems.
llvm-svn: 175855
Jordan Rose [Fri, 22 Feb 2013 01:51:15 +0000 (01:51 +0000)]
[analyzer] Make sure a materialized temporary matches its bindings.
This is a follow-up to r175830, which made sure a temporary object region
created for, say, a struct rvalue matched up with the initial bindings
being stored into it. This does the same for the case in which the AST
actually tells us that we need to create a temporary via a
MaterializeObjectExpr. I've unified the two code paths and moved a static
helper function onto ExprEngine.
This also caused a bit of test churn, causing us to go back to describing
temporary regions without a 'const' qualifier. This seems acceptable; it's
our behavior from a few months ago.
<rdar://problem/
13265460> (part 2)
llvm-svn: 175854
Pete Cooper [Fri, 22 Feb 2013 01:50:38 +0000 (01:50 +0000)]
Fix isa<> check which could never be true.
It was incorrectly checking a Function* being an IntrinsicInst* which
isn't possible. It should always have been checking the CallInst* instead.
Added test case for x86 which ensures we only get one constant load.
It was 2 before this change.
rdar://problem/
13267920
llvm-svn: 175853
Ted Kremenek [Fri, 22 Feb 2013 01:39:26 +0000 (01:39 +0000)]
Fix regression in modeling assignments of an address of a variable to itself. Fixes <rdar://problem/
13226577>.
llvm-svn: 175852
Eric Christopher [Fri, 22 Feb 2013 01:33:46 +0000 (01:33 +0000)]
Make sure we only use the output file as a base for debug splitting
if we're compiling.
llvm-svn: 175851
Fariborz Jahanian [Fri, 22 Feb 2013 01:22:48 +0000 (01:22 +0000)]
objective-C arc: Diagnostic can not say to use bridge
casts with c++ named casts. Change notes to say use
bridge with c-style cast instead. // rdar://
12788838
llvm-svn: 175850
Andrew Trick [Fri, 22 Feb 2013 01:15:08 +0000 (01:15 +0000)]
Remove code copied from GenRegisterInfo.inc.
There's no apparent reason this code was copied from generated source
into a .cpp. It sets a bad example for those working on other targets
and trying to understand the register info API.
llvm-svn: 175849
Jordan Rose [Fri, 22 Feb 2013 01:08:00 +0000 (01:08 +0000)]
[analyzer] Fix buildbot by not reusing a variable name.
llvm-svn: 175848
Eli Bendersky [Fri, 22 Feb 2013 00:50:48 +0000 (00:50 +0000)]
Code cleanup: pass Offset by pointer to parseInstruction to more explicitly
convey that it's a INOUT argument.
Also, if parsing of entry instructions fails, don't push the entry.
llvm-svn: 175847
Bill Wendling [Fri, 22 Feb 2013 00:50:09 +0000 (00:50 +0000)]
Remove warning about default covering no cases.
llvm-svn: 175846
Enrico Granata [Fri, 22 Feb 2013 00:44:16 +0000 (00:44 +0000)]
Fixing the watchpoint test case to reflect changes in error reporting
llvm-svn: 175845
Daniel Malea [Fri, 22 Feb 2013 00:41:26 +0000 (00:41 +0000)]
Make the lldbtest tear down routine a little less error prone
- replace "catch-all" except clause with one that specifically catches what pexpect throws
- handle case where child is already terminated (or is terminating) by the time tear-down is run
llvm-svn: 175844
Bill Wendling [Fri, 22 Feb 2013 00:40:12 +0000 (00:40 +0000)]
Add a bitmask for NoBuiltin. This should *not* be used.
llvm-svn: 175843
Enrico Granata [Fri, 22 Feb 2013 00:39:53 +0000 (00:39 +0000)]
Ignore the check for com.apple.main-thread - it is not critical for the test case's logic
llvm-svn: 175842
Enrico Granata [Fri, 22 Feb 2013 00:37:31 +0000 (00:37 +0000)]
The summary for const char* was not cascading.
This was preventing us from providing a summary for the result of std::string.c_str() with libc++
llvm-svn: 175841
Jordan Rose [Fri, 22 Feb 2013 00:32:00 +0000 (00:32 +0000)]
Preproceessor: fix #if skipping under -traditional-cpp.
When parsing directives within skipped #if blocks, we don't want to retain
any whitespace. Previously we were just skipping comments, but it's not
possible to skip comments and retain other whitespace. This change matches
the usual behavior for parsing directives (i.e. the behavior outside of
skipped #if blocks).
<rdar://problem/
13267695>
llvm-svn: 175840
Eric Christopher [Fri, 22 Feb 2013 00:24:40 +0000 (00:24 +0000)]
Make logic smaller.
llvm-svn: 175839
Michael Gottesman [Fri, 22 Feb 2013 00:16:48 +0000 (00:16 +0000)]
Added a footnote to the documentation for objc_storeStrong that makes it clear
that a __strong object of block type is a valid argument to objc_storeStrong but
that an objc_retain and not an objc_retainBlock will be emitted.
llvm-svn: 175838
Aaron Ballman [Fri, 22 Feb 2013 00:15:31 +0000 (00:15 +0000)]
Removing has_getDecl (added in r175532). It cause a build break for MSVC, and was not yet being used in the codebase. If we start using std::enable_if, we can look into resurrecting the idea in a more portable fashion.
llvm-svn: 175837
Bill Wendling [Fri, 22 Feb 2013 00:13:35 +0000 (00:13 +0000)]
Apply the 'nobuiltin' attribute to call sites when the user specifies `-fno-builtin' on the command line.
llvm-svn: 175836
Bill Wendling [Fri, 22 Feb 2013 00:12:35 +0000 (00:12 +0000)]
Implement the NoBuiltin attribute.
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.
llvm-svn: 175835
Bill Wendling [Fri, 22 Feb 2013 00:04:55 +0000 (00:04 +0000)]
Make for x86 to stop it failing on ARM buildbots.
llvm-svn: 175834
Eric Christopher [Fri, 22 Feb 2013 00:03:08 +0000 (00:03 +0000)]
Grammar.
llvm-svn: 175833
Enrico Granata [Thu, 21 Feb 2013 23:59:42 +0000 (23:59 +0000)]
If the inferior program is compiled with libc++, you won't see libstdc++
llvm-svn: 175832
Enrico Granata [Thu, 21 Feb 2013 23:57:25 +0000 (23:57 +0000)]
<rdar://problem/
13265017>
The notion of Crossref command has long been forgotten, and there is nothing using CommandObjectCrossref in the current LLDB codebase
However, this was causing a conflict with process plugins and command aliases ending up in an infinite loop under situations such as:
(lldb) command alias monitor process plugin packet monitor
(lldb) process att -n Calendar
Process 28709 stopped
Executable module set to "/Applications/Calendar.app/Contents/MacOS/Calendar".
Architecture set to: x86_64-apple-macosx.
(lldb) command alias monitor process plugin packet monitor
This fixes the loop (and consequent crash) by disposing of Crossref commands and related code
llvm-svn: 175831
Jordan Rose [Thu, 21 Feb 2013 23:57:17 +0000 (23:57 +0000)]
[analyzer] Make sure a temporary object region matches its initial bindings.
When creating a temporary region (say, when a struct rvalue is used as
the base of a member expr), make sure we account for any derived-to-base
casts. We don't actually record these in the LazyCompoundVal that
represents the rvalue, but we need to make sure that the temporary region
we're creating (a) matches the bindings, and (b) matches its expression.
Most of the time this will do exactly the same thing as before, but it
fixes spurious "garbage value" warnings introduced in r175234 by the use
of lazy bindings to model trivial copy constructors.
<rdar://problem/
13265460>
llvm-svn: 175830
Matt Kopec [Thu, 21 Feb 2013 23:55:31 +0000 (23:55 +0000)]
Fix clang warnings related to python macro redefinition and printf format specifiers.
llvm-svn: 175829
Andrew Kaylor [Thu, 21 Feb 2013 23:45:19 +0000 (23:45 +0000)]
Change to JITDefault code model for ELF targets
On x86-64 platforms, the small code model assumes that code will be loaded below the 2GB boundary. With the static relocation model, the fact that the expression code is initially loaded (in the LLDB debugger address space) above that boundary causes problems. Switching to the JITDefault code model causes the large code model to be used for 64-bit targets and small code model of 32-bit targets.
llvm-svn: 175828
John McCall [Thu, 21 Feb 2013 23:42:58 +0000 (23:42 +0000)]
Ignore visibility from enclosing template arguments
for explicit member specializations.
llvm-svn: 175827
David Blaikie [Thu, 21 Feb 2013 23:35:06 +0000 (23:35 +0000)]
Simplify code to use castAs rather than getAs + assert.
Post commit review feedback on r175812 from Jordan Rose.
llvm-svn: 175826
David Blaikie [Thu, 21 Feb 2013 23:35:03 +0000 (23:35 +0000)]
Fix copy/paste to refer to the relevant type (ProgramPoint instead of TypeLoc).
Post commit review feedback on r175812 from Jordan Rose.
llvm-svn: 175825
NAKAMURA Takumi [Thu, 21 Feb 2013 23:17:45 +0000 (23:17 +0000)]
clang/test/Driver/qa_override.c: Appease gcc-driver.
llvm-svn: 175824
Richard Smith [Thu, 21 Feb 2013 23:15:05 +0000 (23:15 +0000)]
Fix typo 'with with' in diagnostic.
llvm-svn: 175823
Daniel Malea [Thu, 21 Feb 2013 23:07:30 +0000 (23:07 +0000)]
Fix TestPublicAPIHeaders test on machines that have [DY]LD_LIBRARY_PATH that must be preserved.
llvm-svn: 175822
Cameron Zwarich [Thu, 21 Feb 2013 22:58:42 +0000 (22:58 +0000)]
Stop relying on physical register kill flags in isKilled() in the two-address
pass. One of the callers of isKilled() can cope with overapproximation of kills
and the other can't, so I added a flag to indicate this.
In theory this could pessimize code slightly, but in practice most physical
register uses are kills, and most important kills of physical registers are the
only uses of that register prior to register allocation, so we can recognize
them as kills even without kill flags.
This is relevant because LiveIntervals gets rid of all kill flags.
llvm-svn: 175821
Eli Bendersky [Thu, 21 Feb 2013 22:53:19 +0000 (22:53 +0000)]
Previously, parsing capability of the .debug_frame section was added
to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds
initial ability to parse and dump CFA instructions contained in
entries.
To keep it manageable, the patch omits some more advanced capabilities
(accounted in TODOs):
* Parsing of instructions with BLOCK arguments (expression lists)
* Dumping of actual instruction arguments (currently only names are
dumped). This is quite tricky since the dumper has to effectively
"interpret" the instructions.
llvm-svn: 175820
David Blaikie [Thu, 21 Feb 2013 22:48:34 +0000 (22:48 +0000)]
Limit cast machinery to preserve const and not accept temporaries
After cleaning up the following type hierarchies:
* TypeLoc: r175462
* SVal: r175594
* CFGElement: r175462
* ProgramPoint: r175812
that all invoked undefined behavior by causing a derived copy construction of a
base object through an invalid cast (thus supporting code that relied on
casting temporaries that were direct base objects) Clang/LLVM is now clean of
casts of temporaries. So here's some fun SFINAE machinery (courtesy of Eli
Friedman, with some porting back from C++11 to LLVM's traits by me) to cause
compile-time failures if llvm::cast & friends are ever passed an rvalue.
This should avoid a repeat of anything even remotely like PR14321/r168124.
Thanks to Jordan Rose for the help with the various Static Analyzer related
hierarchies that needed cleaning up, Eli for the SFINAE, Richard Smith, John
McCall, Ted Kremenek, and Anna Zaks for their input/reviews/patience along the
way.
llvm-svn: 175819
Renato Golin [Thu, 21 Feb 2013 22:39:03 +0000 (22:39 +0000)]
Allow GlobalValues to vectorize with AliasAnalysis
Storing the load/store instructions with the values
and inspect them using Alias Analysis to make sure
they don't alias, since the GEP pointer operand doesn't
take the offset into account.
Trying hard to not add any extra cost to loads and stores
that don't overlap on global values, AA is *only* calculated
if all of the previous attempts failed.
Using biggest vector register size as the stride for the
vectorization access, as we're being conservative and
the cost model (which calculates the real vectorization
factor) is only run after the legalization phase.
We might re-think this relationship in the future, but
for now, I'd rather be safe than sorry.
llvm-svn: 175818
David Blaikie [Thu, 21 Feb 2013 22:37:44 +0000 (22:37 +0000)]
Add back implicitly dropped const.
(found due to incoming improvements to llvm::cast machinery that will error on
this sort of mistake)
llvm-svn: 175817
Daniel Malea [Thu, 21 Feb 2013 22:37:18 +0000 (22:37 +0000)]
Update INSTALL.txt to mention LLDB builds on Linux with GCC or Clang.
llvm-svn: 175816
Eric Christopher [Thu, 21 Feb 2013 22:35:08 +0000 (22:35 +0000)]
Fix formatting and tabs in file.
llvm-svn: 175815
Eric Christopher [Thu, 21 Feb 2013 22:35:05 +0000 (22:35 +0000)]
Don't pass -split-dwarf= to the backend unless we're on linux for
now.
llvm-svn: 175814
Eric Christopher [Thu, 21 Feb 2013 22:35:01 +0000 (22:35 +0000)]
Remove the SplitDebug action and replace with a set of commands
in the compilation setup. Note that this doesn't currently
work for -no-integrated-as.
llvm-svn: 175813
David Blaikie [Thu, 21 Feb 2013 22:23:56 +0000 (22:23 +0000)]
Replace ProgramPoint llvm::cast support to be well-defined.
See r175462 for another example/more details.
llvm-svn: 175812
Enrico Granata [Thu, 21 Feb 2013 22:17:45 +0000 (22:17 +0000)]
Previous commit was bogus (testing)
llvm-svn: 175811
Enrico Granata [Thu, 21 Feb 2013 22:17:14 +0000 (22:17 +0000)]
(no commit message)
llvm-svn: 175810
Lang Hames [Thu, 21 Feb 2013 22:16:43 +0000 (22:16 +0000)]
Re-apply r175688, with the changes suggested by Jakob in PR15320.
llvm-svn: 175809
Daniel Malea [Thu, 21 Feb 2013 22:15:52 +0000 (22:15 +0000)]
Mark test as expected-to-fail with GCC because some versions emit DWARF that claims
functions start at the line with the "{" character, whereas clang uses the first line
with source code. As such, this test case will only work with clang.
llvm-svn: 175808
Ted Kremenek [Thu, 21 Feb 2013 22:10:49 +0000 (22:10 +0000)]
Remove superfluous null pointer check. The pointer is used prior to this check.
llvm-svn: 175807
Sean Callanan [Thu, 21 Feb 2013 22:01:43 +0000 (22:01 +0000)]
Hardening in case a thread's frames are missing.
<rdar://problem/
13254824>
llvm-svn: 175806
Dmitri Gribenko [Thu, 21 Feb 2013 22:01:10 +0000 (22:01 +0000)]
AST dumping: dump template instantiations only once
Fixes infinite loop in PR15220.
Patch by Philip Craig.
llvm-svn: 175805
Chad Rosier [Thu, 21 Feb 2013 21:40:51 +0000 (21:40 +0000)]
Remove dead code and whitespace.
llvm-svn: 175804
Daniel Jasper [Thu, 21 Feb 2013 21:40:48 +0000 (21:40 +0000)]
Remove accidentally introduced no-op line.
Was used during experiments, but another if-statements a few lines
before makes it (intentionally) useless.
llvm-svn: 175803
Ted Kremenek [Thu, 21 Feb 2013 21:40:44 +0000 (21:40 +0000)]
Teach serialized diagnostics about notes without locations.
Along the way, improve a diagnostic for "previous declaration here" for implicit parameters.
Fixes <rdar://problem/
13211384>.
llvm-svn: 175802
Daniel Malea [Thu, 21 Feb 2013 21:38:27 +0000 (21:38 +0000)]
Skip another two test cases on Linux that are affected by llvm.org/pr14637
llvm-svn: 175801
Daniel Jasper [Thu, 21 Feb 2013 21:33:55 +0000 (21:33 +0000)]
Consistently put {} onto the same line for empty functions.
This fixes llvm.org/PR15167.
Before:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
:
AAAAAAAA(10),
BBBBBBBBB(10) {
}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() :
AAAAAAAA(10) {}
After:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
:
AAAAAAAA(10),
BBBBBBBBB(10) {}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() :
AAAAAAAA(10) {}
llvm-svn: 175800
Pedro Artigas [Thu, 21 Feb 2013 21:32:00 +0000 (21:32 +0000)]
Clear the whole table including the tombstones, since the tombstone count will
be set to zero that is what it was intended. Should improve performance of
the data structure when clear is invoked frequently (both compile time and
memory usage).
llvm-svn: 175799
Daniel Malea [Thu, 21 Feb 2013 21:18:07 +0000 (21:18 +0000)]
Fix CommandObjectMultiword to initialize all members, and beef up corresponding test case.
llvm-svn: 175798
Daniel Malea [Thu, 21 Feb 2013 21:16:52 +0000 (21:16 +0000)]
Update CMake lists of sources to include files added in r175787 and r175323
llvm-svn: 175797
David Blaikie [Thu, 21 Feb 2013 20:58:29 +0000 (20:58 +0000)]
Replace CFGElement llvm::cast support to be well-defined.
See r175462 for another example/more details.
llvm-svn: 175796
Daniel Malea [Thu, 21 Feb 2013 20:58:22 +0000 (20:58 +0000)]
Adding CMake build system to LLDB. Some known issues remain:
- generate-vers.pl has to be called by cmake to generate the version number
- parallel builds not yet supported; dependency on clang must be explicitly specified
Tested on Linux.
- Building on Mac will require code-signing logic to be implemented.
- Building on Windows will require OS-detection logic and some selective directory inclusion
Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir
who ported them to Linux!
llvm-svn: 175795
Sean Callanan [Thu, 21 Feb 2013 20:54:33 +0000 (20:54 +0000)]
Fixed a case where a stack frame could lose track
of its own target.
<rdar://problem/
13121412>
llvm-svn: 175794
Fariborz Jahanian [Thu, 21 Feb 2013 20:42:11 +0000 (20:42 +0000)]
Patch for debug info of qualified-id types is 'id'
By Adrian Pranti.
llvm-svn: 175793
Enrico Granata [Thu, 21 Feb 2013 20:31:18 +0000 (20:31 +0000)]
Cleanup of the NSString data formatter
llvm-svn: 175792
Benjamin Kramer [Thu, 21 Feb 2013 20:30:05 +0000 (20:30 +0000)]
Try to fix the test for cmake builds, where clang is called clang-3.3.
llvm-svn: 175791
Ted Kremenek [Thu, 21 Feb 2013 20:28:59 +0000 (20:28 +0000)]
[scan-build] Add quotes around clang executable name to handle path withs spaces. Fixes <rdar://problem/
13254727>
llvm-svn: 175790
Eli Bendersky [Thu, 21 Feb 2013 20:05:00 +0000 (20:05 +0000)]
Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us
to delete some duplicated (and slightly different!) code in TRI.
There are potentially other layering problems that can be cleaned up
as a result, or in a similar manner.
The refactoring was OK'd by Anton Korobeynikov on llvmdev.
Note: this touches the target interfaces, so out-of-tree targets may
be affected.
llvm-svn: 175788
Enrico Granata [Thu, 21 Feb 2013 19:57:10 +0000 (19:57 +0000)]
<rdar://problem/4529976>
Adding data formatters for iterators for std::map and std::vector (both libc++ and libstdcpp)
This does not include reverse iterators since they are both trickier (due to requirements the standard imposes on them) and much less useful
llvm-svn: 175787
Bill Wendling [Thu, 21 Feb 2013 19:46:51 +0000 (19:46 +0000)]
Don't assert on empty attributes.
llvm-svn: 175785
Bill Wendling [Thu, 21 Feb 2013 19:44:18 +0000 (19:44 +0000)]
Try to get buildbots to pass these tests.
llvm-svn: 175784
Anshuman Dasgupta [Thu, 21 Feb 2013 19:39:40 +0000 (19:39 +0000)]
Hexagon: Expand cttz, ctlz, and ctpop for now.
llvm-svn: 175783
Jakob Stoklund Olesen [Thu, 21 Feb 2013 19:35:21 +0000 (19:35 +0000)]
Make RAFast::UsedInInstr indexed by register units.
This fixes some problems with too conservative checking where we were
marking all aliases of a register as used, and then also checking all
aliases when allocating a register.
<rdar://problem/
13249625>
llvm-svn: 175782
Ted Kremenek [Thu, 21 Feb 2013 19:33:30 +0000 (19:33 +0000)]
[scan-build] fix xcode version parsing to handle dot releases. Fixes <rdar://problem/
13265300>.
llvm-svn: 175781
Chad Rosier [Thu, 21 Feb 2013 18:56:55 +0000 (18:56 +0000)]
[driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGS
before the DiagnosticsEngine is instantiated. Otherwise, warning options are
not handled correctly.
rdar://
13254743
llvm-svn: 175779
Jordan Rose [Thu, 21 Feb 2013 18:53:19 +0000 (18:53 +0000)]
Preprocessor: preserve whitespace in -traditional-cpp mode.
Note that unlike GNU cpp we currently do not preserve whitespace in macros
(even in -traditional-cpp mode).
<rdar://problem/
12897179>
llvm-svn: 175778
Chad Rosier [Thu, 21 Feb 2013 18:40:49 +0000 (18:40 +0000)]
[driver] Add a dump method for ArgList.
llvm-svn: 175777
Jim Ingham [Thu, 21 Feb 2013 18:38:46 +0000 (18:38 +0000)]
Mark the command as failed if parsing fails.
llvm-svn: 175776
Evan Cheng [Thu, 21 Feb 2013 18:37:54 +0000 (18:37 +0000)]
Radar numbers don't belong in source code.
llvm-svn: 175775
Howard Hinnant [Thu, 21 Feb 2013 18:16:55 +0000 (18:16 +0000)]
Constrain bind operator()() to not exist if the call is not valid. Fixes llvm.org/bugs/show_bug.cgi?id=15295.
llvm-svn: 175774
Bill Schmidt [Thu, 21 Feb 2013 17:26:05 +0000 (17:26 +0000)]
Trivial cleanup
llvm-svn: 175771
Paul Redmond [Thu, 21 Feb 2013 17:20:45 +0000 (17:20 +0000)]
add missing space which prevented the llvm.loop code-block from appearing in the
generated html.
llvm-svn: 175769
Bill Schmidt [Thu, 21 Feb 2013 17:12:27 +0000 (17:12 +0000)]
Large code model support for PowerPC.
Large code model is identical to medium code model except that the
addis/addi sequence for "local" accesses is never used. All accesses
use the addis/ld sequence.
The coding changes are straightforward; most of the patch is taken up
with creating variants of the medium model tests for large model.
llvm-svn: 175767
Alexander Potapenko [Thu, 21 Feb 2013 17:12:21 +0000 (17:12 +0000)]
[ASan] temporarily disable alloc_dealloc_mismatch on Mac, since the previous commit caused error reports in gTest.
llvm-svn: 175766
Lang Hames [Thu, 21 Feb 2013 17:01:59 +0000 (17:01 +0000)]
Revert r175688 - It broke a test case (see PR15320).
llvm-svn: 175765
Alexander Potapenko [Thu, 21 Feb 2013 16:54:09 +0000 (16:54 +0000)]
[ASan] Make sure operator new/delete and friends are intercepted on OS X.
Because the interceptors will reside in a dylib, not the main executable, we can't just declare them,
but must use the interposition machinery.
Fix the test expectations in large_func_test.cc affected by the change.
This CL should make our Mac buildbots green.
llvm-svn: 175763
Eli Bendersky [Thu, 21 Feb 2013 16:40:18 +0000 (16:40 +0000)]
getX86SubSuperRegister has a special mode with High=true for i64 which
exists solely to enable it to call itself for i8 with some registers.
The proposed patch simplifies the function somewhat to make the High
bit only meaningful for the i8 mode, which makes sense. No functional
difference (getX86SubSuperRegister is not getting called from anywhere
outside with i64 and High=true).
llvm-svn: 175762
Han Ming Ong [Thu, 21 Feb 2013 16:31:31 +0000 (16:31 +0000)]
<rdar://problem/
13259230>
Remember to set m_profile_thread to NULL once the profile thread is turned off.
llvm-svn: 175761
Alexander Potapenko [Thu, 21 Feb 2013 15:32:50 +0000 (15:32 +0000)]
[ASan] Declare CreateThread as extern "C" to fix the Windows build.
llvm-svn: 175760
Benjamin Kramer [Thu, 21 Feb 2013 15:24:35 +0000 (15:24 +0000)]
DAGCombiner: Make the post-legalize vector op optimization more aggressive.
A legal BUILD_VECTOR goes in and gets constant folded into another legal
BUILD_VECTOR so we don't lose any legality here. The problematic PPC
optimization that made this check necessary was fixed recently.
llvm-svn: 175759
Christian Konig [Thu, 21 Feb 2013 15:17:41 +0000 (15:17 +0000)]
R600/SI: inline V_ADD|SUB_F32 patterns
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175758
Christian Konig [Thu, 21 Feb 2013 15:17:36 +0000 (15:17 +0000)]
R600/SI: replace IMPLICIT_DEF with SIOperand.ZERO
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175757
Christian Konig [Thu, 21 Feb 2013 15:17:32 +0000 (15:17 +0000)]
R600/SI: replace SI_V_CNDLT with a pattern
It actually fixes quite a bunch of piglit tests.
This is a candidate for the mesa-stable branch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175756
Christian Konig [Thu, 21 Feb 2013 15:17:27 +0000 (15:17 +0000)]
R600/SI: use patterns for clamp, fabs, fneg
Instead of using custom inserters, it's simpler and
should make DAG folding easier.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175755
Christian Konig [Thu, 21 Feb 2013 15:17:22 +0000 (15:17 +0000)]
R600/SI: add all the other missing asm operands v2
v2: put implicit parameters in []
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175754
Christian Konig [Thu, 21 Feb 2013 15:17:17 +0000 (15:17 +0000)]
R600/SI: add the missing M*BUF|IMG asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175753
Christian Konig [Thu, 21 Feb 2013 15:17:13 +0000 (15:17 +0000)]
R600/SI: add the missing S_* asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175752
Christian Konig [Thu, 21 Feb 2013 15:17:09 +0000 (15:17 +0000)]
R600/SI: rework VOP3 classes
Order the classes and add asm operands.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175751
Christian Konig [Thu, 21 Feb 2013 15:17:04 +0000 (15:17 +0000)]
R600/SI: simplify VOPC_* pattern v2
Fixing asm operation names.
v2: fix name of the e64 encoding, also add asm operands
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175750