Chris Lattner
0f4a64011e
Implement rdar://9009151, transforming strided loop stores of
...
unsplatable values into memset_pattern16 when it is available
(recent darwins). This transforms lots of strided loop stores
of ints for example, like 5 in vpr:
Formed memset: call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25)
from store to: {%3,+,4}<%11> at: store i32 3, i32* %scevgep, align 4, !tbaa !4
llvm-svn: 126040
2011-02-19 19:31:39 +00:00
Anders Carlsson
68b36aff46
Disallow try/catch/throw when exceptions are disabled.
...
llvm-svn: 126039
2011-02-19 19:26:44 +00:00
Douglas Gregor
bf2b26d805
The member classes of a current instantiation aren't necessarily a
...
current instantiation, even though we have a RecordDecl describing
them. Fixes PR9255.
Amusingly, I've had this patch sitting around for a month or two
because it was "obviously" wrong, but hadn't gotten around to writing
a test case to submit the fix :)
llvm-svn: 126038
2011-02-19 19:24:40 +00:00
Anders Carlsson
479d6f51e3
Pass -fexceptions to all tests that use try/catch/throw.
...
llvm-svn: 126037
2011-02-19 19:23:03 +00:00
Douglas Gregor
0cf82f6ad0
Teach the virtual-functions-without-virtual-destructor warning to only
...
warn about polymorphic classes (which have virtual functions) rather
than dynamic classes (which are polymorphic or have virtual bases).
llvm-svn: 126036
2011-02-19 19:14:36 +00:00
Douglas Gregor
f05c0958e2
Remove the Fix-It for "main must return 'int'", which is not always
...
correct and is not worth fixing. Fixes PR8396.
llvm-svn: 126035
2011-02-19 19:04:23 +00:00
Ken Dyck
85ef0431a7
Expand use of CharUnits for alignments further. No change in functionality
...
intended.
llvm-svn: 126034
2011-02-19 18:58:07 +00:00
Douglas Gregor
b11aad8cba
Revert all of my commits that devirtualized the Decl hierarchy, which
...
lead to a serious slowdown (4%) on parsing of Cocoa.h. This memory
optimization should be revisited later, when we have time to look at
the generated code.
llvm-svn: 126033
2011-02-19 18:51:44 +00:00
Jeffrey Yasskin
39a5820059
Use PARSE_ARGUMENTS to clean up add_clang_unittest's calling convention.
...
It would be nice to propagate this into the other functions to replace
LLVM_LINK_COMPONENTS and friends, but I don't plan to do that.
llvm-svn: 126032
2011-02-19 18:06:01 +00:00
Jeffrey Yasskin
139412e169
Add the PARSE_ARGUMENTS CMake macro to LLVM so I can use it to clean
...
up add_clang_unittest's calling convention.
llvm-svn: 126031
2011-02-19 18:01:15 +00:00
Argyrios Kyrtzidis
3b1b3fe039
[analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++.
...
llvm-svn: 126026
2011-02-19 08:03:21 +00:00
Argyrios Kyrtzidis
eb8357c1d8
[analyzer] Fix crash when analyzing C++ code.
...
llvm-svn: 126025
2011-02-19 08:03:18 +00:00
Jeffrey Yasskin
ecdd68d760
Remove support and mc from the clang unittests' dependencies because they're not
...
needed or provided by the libraries under test.
The next step is to import http://www.itk.org/Wiki/CMakeMacroParseArguments to
make the empty string parameter unnecessary.
llvm-svn: 126024
2011-02-19 06:07:17 +00:00
Daniel Dunbar
1094bb101b
Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
...
the special way we model "linker input" arguments.
llvm-svn: 126023
2011-02-19 05:33:51 +00:00
Argyrios Kyrtzidis
12f146a3ef
Use PointerUnion::getAddrOf instead of messing with PointerUnion & reinterpret_cast.
...
llvm-svn: 126021
2011-02-19 04:02:34 +00:00
Ted Kremenek
ff6fd0f4b0
Change 'StoreRef' back to 'Store' in GRState, shrinking the size of GRState back by one pointer.
...
llvm-svn: 126020
2011-02-19 03:56:19 +00:00
Argyrios Kyrtzidis
e9fb6b891e
Allow getting the address of the value in a PointerUnion or PointerIntPair if one is
...
confident enough that he knows what he is doing.
llvm-svn: 126019
2011-02-19 03:55:58 +00:00
Eric Christopher
c509ff6944
Fix typos.
...
llvm-svn: 126018
2011-02-19 03:19:09 +00:00
John McCall
68cc3350a8
Fix a -Wuninitialized warning; it's actually a false positive,
...
but it's not reasonable for the diagnostic to figure that out.
Pointed out by Benjamin Kramer.
Also clarify the logic here.
llvm-svn: 126017
2011-02-19 03:13:26 +00:00
John McCall
8377967543
Warn about code that uses variables and functions with internal linkage
...
without defining them. This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition. I'll revisit later.
Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake. Doing so produces an invalid module
if the variable is not ultimately defined.
Also, fix several places in the test suite where we were using internal
functions without definitions.
llvm-svn: 126016
2011-02-19 02:53:41 +00:00
Jim Ingham
85e8b81492
- Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
...
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.
llvm-svn: 126015
2011-02-19 02:53:09 +00:00
Argyrios Kyrtzidis
21f347e729
[analyzer] Fix crash when analyzing C++ code.
...
llvm-svn: 126013
2011-02-19 01:59:41 +00:00
Ted Kremenek
fda3687515
Add 'StoreRef' smart pointer to allow more fine-grain memory lifetime control of Store objects.
...
This yields a minor memory reduction (for larger functions) on Sqlite at the cost of slightly
higher memory usage on some functions because of the increased size of GRState (which can be optimized).
I expect the real memory savings from this enhancement will come when we aggressively
canabilize more of the ExplodedGraph.
llvm-svn: 126012
2011-02-19 01:59:33 +00:00
Ted Kremenek
f66e5b695f
Add ImmutableMap methods 'manualRetain()', 'manualRelease()', and 'getRootWithoutRetain()' to help more aggressively reclaim memory in the static analyzer.
...
llvm-svn: 126011
2011-02-19 01:59:21 +00:00
Johnny Chen
ce0dec7597
Make the helper method ReadCoreReg(uint32_t reg, bool *success) more generic
...
which now handles R0-R12, SP, LR, as well as PC. And refactored a lot of
calls to ReadRegisterUnsigned() to now funnel through ReadCoreReg(), instead.
llvm-svn: 126010
2011-02-19 01:36:13 +00:00
Devang Patel
5f1b4cdda1
Do not emit empty DW_TAG_lexical_block DIEs. In one test case, size of debug info reduced by almost 7%.
...
llvm-svn: 126009
2011-02-19 01:31:27 +00:00
Devang Patel
5d12337655
DIE numbers do not add any value in this test.
...
llvm-svn: 126008
2011-02-19 01:28:37 +00:00
Argyrios Kyrtzidis
e34245b30b
[analyzer] Fix crash when analyzing C++ code.
...
llvm-svn: 126007
2011-02-19 01:08:41 +00:00
Argyrios Kyrtzidis
1227f3afca
[analyzer] Disable a test until inlining CXXConstructExprs is fully investigated.
...
llvm-svn: 126006
2011-02-19 01:08:37 +00:00
Jakob Stoklund Olesen
f1a60a61ba
Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().
...
llvm-svn: 126005
2011-02-19 00:53:42 +00:00
Joerg Sonnenberger
740467a245
Avoid dangling else warnings.
...
llvm-svn: 126004
2011-02-19 00:43:45 +00:00
Jakob Stoklund Olesen
04aff708fd
Missed member rename for naming convention.
...
llvm-svn: 126003
2011-02-19 00:42:33 +00:00
Jakob Stoklund Olesen
13eb3650b0
This method belonged in VirtRegMap.
...
llvm-svn: 126002
2011-02-19 00:38:43 +00:00
Jakob Stoklund Olesen
609bc44c2e
Separate timers for local and global splitting.
...
llvm-svn: 126001
2011-02-19 00:38:40 +00:00
Mikhail Glushenkov
82e559837a
Make "-opt [-emit-llvm]" work for .ll files.
...
Patch by Kaelyn Uhrain!
llvm-svn: 126000
2011-02-19 00:33:27 +00:00
Chandler Carruth
4c4f8de421
Improve bool and char integral template argument printing in
...
diagnostics, resolving PR9227.
Patch originally by Mihai Rusu and Stephen Hines with some minimal style
tweaks from me.
llvm-svn: 125999
2011-02-19 00:21:00 +00:00
Chandler Carruth
9c9127eace
Fix a missed case in the NULL operand to conditional operator
...
diagnostics.
Patch by Stephen Hines.
llvm-svn: 125998
2011-02-19 00:13:59 +00:00
Chandler Carruth
fc1ad1f371
Update the test error messages to match the update I made to the actual
...
messages.
llvm-svn: 125997
2011-02-19 00:12:23 +00:00
Chandler Carruth
98e3c568bf
Fix PR8767, improve diagnostic wording when allocating an object of an
...
abstract class type.
Patch by Stephen Hines, with a wording tweak from Doug applied by me.
llvm-svn: 125996
2011-02-18 23:59:51 +00:00
Chandler Carruth
a8bea4b90e
Initial steps to improve diagnostics when there is a NULL and
...
a non-pointer on the two sides of a conditional expression.
Patch by Stephen Hines and Mihai Rusu.
llvm-svn: 125995
2011-02-18 23:54:50 +00:00
Caroline Tice
55532be31f
Add code to emulate LDRB (register) Arm instruction.
...
llvm-svn: 125994
2011-02-18 23:52:21 +00:00
Chandler Carruth
241b31378d
Check for NULL child expressions before visiting them, as the first
...
thing the visit does is dyn_cast<>, which leads to a nasty segfault.
llvm-svn: 125993
2011-02-18 23:42:00 +00:00
Johnny Chen
ce4e629fdf
Add emulation methods for "ORR (immediate)" and "ORR (register)".
...
Add Encoding T3 of "MOV (register)" to EmulateMOVRdRm() method and fixed
some bugs in EmulateMOVRdImm() and EmulateMOVRdRm() methods.
llvm-svn: 125992
2011-02-18 23:41:11 +00:00
Douglas Gregor
3a69eafa88
When code-completing a case statement for a switch on a value of
...
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.
llvm-svn: 125991
2011-02-18 23:30:37 +00:00
Devang Patel
2d6390d47b
Start using enums from DIBuilder.
...
llvm-svn: 125990
2011-02-18 23:29:22 +00:00
Devang Patel
0555fd38b3
Provide enums to build complex address calucation expressions.
...
(This is infact direct copy from DIFactory, which is disappearing soon.)
llvm-svn: 125989
2011-02-18 23:28:53 +00:00
Devang Patel
f20e5a905f
Remove unused tag.
...
llvm-svn: 125988
2011-02-18 23:23:09 +00:00
Devang Patel
0ca3d1e980
These tags are now covered by dwarf::TagString().
...
llvm-svn: 125987
2011-02-18 23:13:40 +00:00
Devang Patel
4192802280
Provide tag strings for llvm specific tags.
...
llvm-svn: 125986
2011-02-18 23:06:29 +00:00
Daniel Dunbar
5423b497ab
More correct fix for CMake breakage I was seeing, my buildbots use
...
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.
llvm-svn: 125985
2011-02-18 22:55:32 +00:00