Commit Graph

139879 Commits

Author SHA1 Message Date
NAKAMURA Takumi 3df909d030 Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."
It broke stage2.

llvm-svn: 170835
2012-12-21 02:50:38 +00:00
Argyrios Kyrtzidis d4635d4865 [libclang] Follow-up to r170824, provide the correct number of arguments for
a not-fully-formed macro invocation during code-completion.

llvm-svn: 170833
2012-12-21 01:51:12 +00:00
Anna Zaks 9747febba9 [analyzer] Address Jordan's nitpicks as per code review of r170625.
llvm-svn: 170832
2012-12-21 01:50:14 +00:00
Evan Cheng 99cafb1db2 Every pass deserves a name, even codegenprep.
llvm-svn: 170831
2012-12-21 01:48:14 +00:00
Nadav Rotem 6d4fdd6d2c Improve the X86 cost model for loads and stores.
llvm-svn: 170830
2012-12-21 01:33:59 +00:00
Rafael Espindola e7ec558f25 Revert r170826. The output of
./bin/clang -cc1 -internal-isystem /home/espindola/llvm/build/lib/clang/3.3/include/ -analyze -analyzer-checker=debug.DumpCallGraph /home/espindola/llvm/clang/test/Analysis/debug-CallGraph.c -fblocks

changes in each run.

llvm-svn: 170829
2012-12-21 01:30:23 +00:00
Nadav Rotem a4b53f20a3 BB-Vectorizer: Check the cost of the store pointer type
and not the return type, which is void. A number of test
cases fail after adding the assertion in TTImpl.

llvm-svn: 170828
2012-12-21 01:24:36 +00:00
Rafael Espindola 2be6b72ce0 Don't eagerly emit a global static merged with a local extern.
When we are visiting the extern declaration of 'i' in

static int i = 99;
int foo() {
  extern int i;
  return i;
}

We should not try to handle it as if it was an function static. That is, we
must consider the written storage class.

Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the
if leading to its call are not completely accurate. They were passing before
because the second decl was marked as having external storage. I changed them
to check the linkage, which I find easier to understand.

Last but not least, there is something strange going on with cuda and opencl.
My guess is that the linkage computation for these languages needs to be
audited, but I didn't want to change that in this patch so I just updated
the storage classes to keep the current behavior.

Thanks to Reed Kotler for reporting this.

llvm-svn: 170827
2012-12-21 01:21:33 +00:00
Anna Zaks 77ca7f1bbe [analyzer] Traverse the Call Graph in topological order.
Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.

Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.

Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.

llvm-svn: 170826
2012-12-21 01:19:22 +00:00
Anna Zaks 5c32dfc5fb [analyzer] Add blocks and ObjC messages to the call graph.
This paves the road for constructing a better function dependency graph.
If we analyze a function before the functions it calls and inlines,
there is more opportunity for optimization.

Note, we add call edges to the called methods that correspond to
function definitions (declarations with bodies).

llvm-svn: 170825
2012-12-21 01:19:15 +00:00
Argyrios Kyrtzidis c1d9a67e2b [libclang] Make sure we can code-complete inside a macro argument even though
the macro invocation is not fully formed.

rdar://11290992

llvm-svn: 170824
2012-12-21 01:17:20 +00:00
Reed Kotler 93f778d2bd Add test case for r170674
llvm-svn: 170823
2012-12-21 00:55:10 +00:00
Reed Kotler 9bff1ead0e Call llvm_unreachable instead of assert.
llvm-svn: 170822
2012-12-21 00:44:59 +00:00
Sean Silva 850861df62 docs: More robust image scaling fix.
Hopefully these benchmarks will be updated in the future, so avoid
hardcoding image dimensions.

llvm-svn: 170819
2012-12-21 00:28:42 +00:00
Andrew Kaylor 06a18d7d56 Updating TestAbbreviations.py to check for a reduced set of instructions when testing 'dis -f'.
Not all of the expected instructions were being generated for the function being disassembled on x86-64-based Linux.  It had no push, pop or leave.

llvm-svn: 170818
2012-12-21 00:26:22 +00:00
NAKAMURA Takumi f115642b61 EditedSource.cpp: Appease msvc, to add <cctype>.
llvm-svn: 170817
2012-12-21 00:21:02 +00:00
Sean Silva 35915c6459 docs: Prevent image scaling.
Tell the image to be its natural size.

llvm-svn: 170816
2012-12-21 00:20:25 +00:00
Sean Silva 426914a549 docs: Convert ObjectiveCLiterals to reST.
Sphinx's syntax highlighter doesn't recognize the new literals, so the
syntax highlighting is pretty pathetic.

llvm-svn: 170814
2012-12-21 00:17:02 +00:00
Sean Silva 2ff89eb835 docs: fix Sphinx toctree warning.
llvm-svn: 170813
2012-12-21 00:16:58 +00:00
Sean Silva 5f25c50e91 docs: Convert DriverInternals to reST.
llvm-svn: 170812
2012-12-21 00:16:53 +00:00
Nadav Rotem e7785686a5 Fix a bug in the code that checks if we can vectorize loops while using dynamic
memory bound checks.  Before the fix we were able to vectorize this loop from
the Livermore Loops benchmark:

for ( k=1 ; k<n ; k++ )
  x[k] = x[k-1] + y[k];

llvm-svn: 170811
2012-12-21 00:07:35 +00:00
Eric Christopher 6e47b725ff Move these files over to the debug info directory.
llvm-svn: 170810
2012-12-21 00:03:42 +00:00
Richard Smith 789ce142df Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member.
llvm-svn: 170806
2012-12-20 23:49:09 +00:00
Douglas Gregor 27c42e66bb Revert r170801, which breaks the mingw build.
llvm-svn: 170804
2012-12-20 23:36:52 +00:00
Sean Silva e9ba463632 docs: Try out nosidebar.
Please squawk if you find this appalling or otherwise don't like it.

llvm-svn: 170803
2012-12-20 23:35:22 +00:00
Douglas Gregor d04592dc81 Eliminate errors when running the 'PrintFunctionNames' plugin, from Li Qun!
llvm-svn: 170801
2012-12-20 23:11:42 +00:00
Andrew Kaylor f85defaea5 Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.
llvm-svn: 170800
2012-12-20 23:08:03 +00:00
Sean Silva 287e7d275c docs: Cleanup trailing whitespace.
llvm-svn: 170799
2012-12-20 22:59:36 +00:00
Jakob Stoklund Olesen 2455b58551 Require the two-argument MI::addOperand(MF, MO) for dangling instructions.
Instructions that are inserted in a basic block can still be decorated
with addOperand(MO).

Make the two-argument addOperand() function contain the actual
implementation. This function will now always have a valid MF reference
that it can use for memory allocation.

llvm-svn: 170798
2012-12-20 22:54:05 +00:00
Jakob Stoklund Olesen 33f5d1492d Add an MF argument to MI::copyImplicitOps().
This function is often used to decorate dangling instructions, so a
context reference is required to allocate memory for the operands.

Also add a corresponding MachineInstrBuilder method.

llvm-svn: 170797
2012-12-20 22:54:02 +00:00
Jakob Stoklund Olesen ac4210eacb Use two-arg addOperand(MF, MO) internally in MachineInstr when possible.
llvm-svn: 170796
2012-12-20 22:53:58 +00:00
Jakob Stoklund Olesen 2ea203694d MachineInstrBuilderize ARM.
llvm-svn: 170795
2012-12-20 22:53:55 +00:00
Jakob Stoklund Olesen 4255c96aed MachineInstrBuilderize NVPTX.
llvm-svn: 170794
2012-12-20 22:53:53 +00:00
Eli Bendersky 75a7a338fc Fix an unitialized member variable that may have caused sporadic failures
for code that wasn't even in bundling mode.

llvm-svn: 170793
2012-12-20 22:51:52 +00:00
Sean Silva e140b2ee67 docs: actually indent these consistently
llvm-svn: 170792
2012-12-20 22:49:13 +00:00
Sean Silva 8c44a4733c docs: Indent consistently in code examples.
llvm-svn: 170791
2012-12-20 22:47:41 +00:00
Sean Silva 99e12f91a6 docs: Improve navigation for Vectorizers.rst
Add links in the intro paragraph.
Add table of contents.

llvm-svn: 170790
2012-12-20 22:42:20 +00:00
Ted Kremenek 9453721985 Revert "Warn if a __weak variable is initialized with an Objective-C object literal."
Per code feedback, I want to see if there is a more general way to do this.

llvm-svn: 170777
2012-12-20 22:31:27 +00:00
Sean Silva fd706f7da9 docs: bring back link for reddit.
llvm-svn: 170776
2012-12-20 22:24:37 +00:00
Eric Christopher 48fef599a4 Whitespace and 80-column cleanup.
llvm-svn: 170771
2012-12-20 21:58:40 +00:00
Eric Christopher e698f53740 Start splitting out the debug string section handling by moving it
into the DwarfUnits class.

llvm-svn: 170770
2012-12-20 21:58:36 +00:00
Sean Silva eae2d90508 docs: Make document name congruent with title.
Hopefully nobody has linked to it yet...

OK'd by Nadav.

llvm-svn: 170768
2012-12-20 21:50:41 +00:00
Bill Wendling 66e978f904 Some random comment, naming, and format changes.
Rename the AttributeImpl* from Attrs to pImpl to be consistent with other code.
Add comments where none were before. Or doxygen-ify other comments.

llvm-svn: 170767
2012-12-20 21:28:43 +00:00
Jakob Stoklund Olesen 00b28ecfae Remove two dead functions.
llvm-svn: 170766
2012-12-20 21:12:42 +00:00
Bob Wilson 7bba4f8957 Revert "Adding support for llvm.arm.neon.vaddl[su].* and"
This reverts r170694.  The operations can be represented in IR without
adding any new intrinsics.

llvm-svn: 170765
2012-12-20 21:09:38 +00:00
Argyrios Kyrtzidis cbfd4d2483 Use some heuristics so that when a fixit removes a source range, we try
to also remove a trailing space if possible.

For example, removing '__bridge' from:

i = (__bridge I*)p;

should result in:

i = (I*)p;

not:

i = ( I*)p;

rdar://11314821

llvm-svn: 170764
2012-12-20 21:05:53 +00:00
Ted Kremenek b39cfd41f2 Warn if a __weak variable is initialized with an Objective-C object literal.
Such variables may immediately become nil or may have unpredictable
behavior.

Fixes <rdar://problem/12569201>.

llvm-svn: 170763
2012-12-20 20:55:03 +00:00
Dmitri Gribenko b420ef75fb Documentation: use monospaced font in BlockLanguageSpec, and fix a link to this
document

llvm-svn: 170762
2012-12-20 20:51:59 +00:00
Chad Rosier f8a2e70b08 Use the MaybeParseMicrosoftAttributes function.
llvm-svn: 170761
2012-12-20 20:37:53 +00:00
Daniel Jasper 9dd7e0f1f9 Remove namespace qualifier that lead to build breakage.
llvm-svn: 170759
2012-12-20 20:31:38 +00:00