Commit Graph

124503 Commits

Author SHA1 Message Date
Evgeniy Stepanov 823085a8f4 [asan] Support for %z to Printf()
At the moment, asan internal Printf() uses %l modifier for printing
values of size_t and related types. This works, because we control
both the implementation of Printf and all its uses, but can be a
little misleading.

This change adds support for %z to Printf(). All callers that print
sizes and pointers as integers are switched to %zu / %zx.

llvm-svn: 153177
2012-03-21 11:32:46 +00:00
Chandler Carruth 3ffccb3802 Teach instsimplify to gracefully degrade in the presence of instructions
not attched to a basic block or function. There are conservatively
correct answers in these cases, and this makes the analysis more useful
in contexts where we have a partially formed bit of IR.

I don't have any way to test this directly... suggestions welcome here,
but I'm not seeing anything sadly. I only found this using a subsequent
patch to the inliner which runs instsimplify on partially inlined
instructions, and even then only on a quite large program. I never got
a reasonable testcase out of it, and anything I do get is likely to be
quite fragile due to requiring an interaction of two different passes,
and the only result being a segfault if it goes wrong.

llvm-svn: 153176
2012-03-21 10:58:47 +00:00
Alexander Potapenko 1159250518 s/Printf/Report for libc interceptors (need this to debug the potential double interception)
llvm-svn: 153175
2012-03-21 09:33:05 +00:00
Anders Waldenborg b766e2490d [python] Add some paths where to find test binary
Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)

llvm-svn: 153174
2012-03-21 08:34:58 +00:00
Anders Waldenborg 87b1d460f9 [python] Mark get_test_binary as not being a test
get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.

llvm-svn: 153173
2012-03-21 08:18:19 +00:00
NAKAMURA Takumi 98b18777a4 lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions.
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.

Disable win32file at ImportError. Thanks to Francois to let me know.

FIXME: Could we report warning or notification if win32file were not found?
llvm-svn: 153172
2012-03-21 07:49:44 +00:00
Gregory Szorc 52d2660441 Finish organizing C API docs.
Remaining "uncategorized" functions have been organized into their
proper place in the hierarchy. Some functions were moved around so
groups are defined together.

No code changes were made.

llvm-svn: 153169
2012-03-21 07:28:27 +00:00
John McCall b6c4a7ef21 For the annals of subtle but terrible bugs: fix a longstanding bug
in vtable layout where virtual methods inherited from virtual bases
could be assigned the same vcall adjustment slot if they shared
a name and parameter signature but differed in their
cv-qualification.  The code was already trying to handle this
case, but unfortunately used the ordinary type qualifiers
(which are always empty here) instead of the method qualifiers.
This seems like something that the API should discourage, but
I don't know how to carry that principle out in this instance.

Eliminate this function's need for an ASTContext while we're at it.

This bug affects the ABI, and fixing it brings us into accord with
the Itanium ABI (and GCC's implementation of it), but, obviously,
technically breaks full compatibility with previous releases of Clang.
Just letting you know.

llvm-svn: 153168
2012-03-21 06:57:19 +00:00
NAKAMURA Takumi a4917fade7 clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.
llvm-svn: 153167
2012-03-21 06:25:42 +00:00
Joerg Sonnenberger 5463e66768 Fix generation of the address size override prefix. Add assertions for
the invalid cases. At least 16bit operand in 64bit mode is currently not
rejected in the parser.

llvm-svn: 153166
2012-03-21 05:48:07 +00:00
Andrew Trick e357cfa3db I meant to disable this test, not XFAIL it
llvm-svn: 153165
2012-03-21 05:18:53 +00:00
Greg Clayton 2af282a16b Fixed the ability to load a module from a path by using just a UUID. After
the migration to ModuleSpec objects this broke and is now fixed.

Also fixed a case in the darwin kernel dynamic loader where we just need to
trust the load address of the kernel if we can't read it from memory.

llvm-svn: 153164
2012-03-21 04:25:00 +00:00
Andrew Trick f0a517fec8 misched: beginning to add unit tests
llvm-svn: 153163
2012-03-21 04:12:19 +00:00
Andrew Trick 25baeca54d misched: fix LiveInterval update for bottom-up scheduling
llvm-svn: 153162
2012-03-21 04:12:16 +00:00
Andrew Trick adb03b91ee misched: trace LiveIntervals after scheduling.
llvm-svn: 153161
2012-03-21 04:12:12 +00:00
Andrew Trick 54f7def703 misched: obvious iterator update fixes for bottom-up.
llvm-svn: 153160
2012-03-21 04:12:10 +00:00
Andrew Trick de670c0304 misched: cleanup main loop
llvm-svn: 153159
2012-03-21 04:12:07 +00:00
Andrew Trick 3bfafcba10 misched: fix LI update for bottom-up.
llvm-svn: 153158
2012-03-21 04:12:01 +00:00
Gregory Szorc 34c863a031 Organize LLVM C API docs into doxygen modules; add docs
This gives a lot of love to the docs for the C API. Like Clang's
documentation, the C API is now organized into a Doxygen "module"
(LLVMC). Each C header file is a child of the main module. Some modules
(like Core) have a hierarchy of there own. The produced documentation is
thus better organized (before everything was in one monolithic list).

This patch also includes a lot of new documentation for APIs in Core.h.
It doesn't document them all, but is better than none. Function docs are
missing @param and @return annotation, but the documentation body now
commonly provides help details (like the expected llvm::Value sub-type
to expect).

llvm-svn: 153157
2012-03-21 03:54:29 +00:00
NAKAMURA Takumi 3eb0edde78 RewriteModernObjC.cpp: Don't expose temporary std::string with StringRef. (StringRef)getName() can be used here.
llvm-svn: 153156
2012-03-21 03:21:46 +00:00
Craig Topper 344e0128ba Add typecast to silence -Wswitch warning introduced by r153153.
llvm-svn: 153155
2012-03-21 02:28:53 +00:00
Craig Topper 9cfc69c779 Spacing fixes and using 'unsigned' instead of 'int' to index to select shuffle elements for consistency with other shuffle code in X86 backend.
llvm-svn: 153154
2012-03-21 02:14:01 +00:00
Akira Hatanaka 0137dfe42a Incremental big endian patch by Jack Carter.
These changes allow us to compile big endian from the command line for 32 bit
Mips targets. This patch will result in code and data actually being produced
in the correct endianess.

llvm-svn: 153153
2012-03-21 00:52:01 +00:00
John McCall f21bfcf805 Test case for rdar://problem/11055105, a bug with the instantiation
of references to function template parameters in noexcept clauses when
the instantiation is forced from a point during parsing when a block
is in scope.

llvm-svn: 153152
2012-03-21 00:45:33 +00:00
Fariborz Jahanian 69a76e98fe Close the paren.
// rdar://11076938

llvm-svn: 153151
2012-03-21 00:01:15 +00:00
Eric Christopher 7d522f161d Zap some dead code pointed out by Chandler.
llvm-svn: 153150
2012-03-20 23:28:58 +00:00
Eric Christopher 6dde3e1450 Update comment.
llvm-svn: 153149
2012-03-20 23:28:32 +00:00
Anna Zaks a3b666ac4a Make sure ImmutableSet never inserts Tombstone/Entry into DenseMap.
ImmutAVLTree uses random unsigned values as keys into a DenseMap,
which could possibly happen to be the same value as the Tombstone or
Entry keys in the DenseMap.

Test case is hard to come up with. We randomly get failures on the
internal static analyzer bot, which most likely hits this issue
(hard to be 100% sure without the full stack).

llvm-svn: 153148
2012-03-20 22:56:27 +00:00
Sean Callanan eba3a66055 RuntimeDyldMachO has the ability to keep track of
relocations (i.e., pieces of data whose addresses
are referred to elsewhere in the binary image) and
update the references when the section containing
the relocations moves.  The way this works is that
there is a map from section IDs to lists of
relocations.

Because the relocations are associated with the
section containing the data being referred to, they
are updated only when the target moves.  However,
many data references are relative and also depend
on the location of the referrer.

To solve this problem, I introduced a new data
structure, Referrer, which simply contains the
section being referred to and the index of the
relocation in that section.  These referrers are
associated with the source containing the
reference that needs to be updated, so now
regardless of which end of the relocation moves,
the relocation will now be updated correctly.

llvm-svn: 153147
2012-03-20 22:25:39 +00:00
Patrick Beard aae4a392e5 numberWithFloat -> numberWithDouble.
llvm-svn: 153146
2012-03-20 22:24:08 +00:00
Fariborz Jahanian 952c3b9512 modern objective-c translator: insert couple of pragmas for optimization.
// rdar://11079898

llvm-svn: 153145
2012-03-20 22:24:05 +00:00
Patrick Beard 0661d0fc42 Fixed typo.
llvm-svn: 153142
2012-03-20 21:52:11 +00:00
Patrick Beard f964c7be8d Added summary section for Object Literals and Subscripting, which contains the external link.
llvm-svn: 153141
2012-03-20 21:51:03 +00:00
Chad Rosier cbf45a6d8a Fix test case from r153135.
llvm-svn: 153140
2012-03-20 21:49:54 +00:00
Chad Rosier 4106917355 [avx] Add patterns for combining vextractf128 + vmovaps/vmovups/vmobdqu to
vextractf128 with 128-bit mem dest.

Combines

	vextractf128 $0, %ymm0, %xmm0
	vmovaps %xmm0, (%rdi)

to

    vextractf128 $0, %ymm0, (%rdi)

rdar://11082570

llvm-svn: 153139
2012-03-20 21:43:40 +00:00
Fariborz Jahanian cd79a49f37 modern objective-c translator: add static function to initialize
the class pointer in the category structure.
// rdar://11076938

llvm-svn: 153138
2012-03-20 21:41:28 +00:00
Jim Grosbach 1283317db4 Assembler should accept redefinitions of unused variable symbols.
rdar://11027851

llvm-svn: 153137
2012-03-20 21:33:21 +00:00
Jim Grosbach 765a6e0231 Tidy up.
llvm-svn: 153136
2012-03-20 21:33:17 +00:00
Evan Cheng 759b1d169f Change conditional instructions definitions, e.g. ANDCC, ARMPseudoExpand and t2PseudoExpand.
llvm-svn: 153135
2012-03-20 21:28:05 +00:00
Andrew Trick f7711010e1 LoopSimplify bug fix. Handle indirect loop back edges.
Do not call SplitBlockPredecessors on a loop preheader when one of the
predecessors is an indirectbr. Otherwise, you will hit this assert:
!isa<IndirectBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from an IndirectBrInst"

llvm-svn: 153134
2012-03-20 21:24:52 +00:00
Andrew Trick bb01cbb312 whitespace
llvm-svn: 153133
2012-03-20 21:24:47 +00:00
Andrew Trick 9c45706baf LSR: teach isSimplifiedLoopNest to handle PHI IVUsers.
llvm-svn: 153132
2012-03-20 21:24:44 +00:00
Andrew Trick 3660735e18 LSR: fix IVUsers isSimplifiedLoopNest to perform a full domtree walk
instead of skipping the current loop.

My prior fix was incomplete because of an overzealous compile-time optimization:
Better fix for: <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce

llvm-svn: 153131
2012-03-20 21:24:40 +00:00
Sebastian Redl d9170b09e6 More careful consideration of C++11 13.3.3.1p4. Fixes PR12257.
llvm-svn: 153130
2012-03-20 21:24:14 +00:00
Sebastian Redl 6db0b1bfed Fix the other place where C++98 work for initializer lists was necessary.
llvm-svn: 153129
2012-03-20 21:24:03 +00:00
Sean Callanan 61b33f7464 Fixed some potential null-pointer bugs in the
expression parser code.

llvm-svn: 153128
2012-03-20 21:11:12 +00:00
Fariborz Jahanian 3546559863 more modern objective-c meta-data stuff.
llvm-svn: 153127
2012-03-20 21:09:58 +00:00
Patrick Beard bbb7ffc63f Fixed typos.
llvm-svn: 153126
2012-03-20 21:09:25 +00:00
Evan Cheng 630a7f3064 Reserve number of MI operands to accom,odate complex patterns.
llvm-svn: 153125
2012-03-20 21:07:51 +00:00
Patrick Beard fbb2e46299 Link to Objective-C literals documentation.
llvm-svn: 153124
2012-03-20 20:51:09 +00:00