Commit Graph

143315 Commits

Author SHA1 Message Date
Fariborz Jahanian e4c7e855f1 objective-C modern translator. Generate #line
info in the translated code under -g only.
// rdar://13138170

llvm-svn: 174684
2013-02-08 00:27:34 +00:00
Douglas Gregor f5f9452808 Teach subframework header lookup to suggest modules <rdar://problem/13176200>.
llvm-svn: 174683
2013-02-08 00:10:48 +00:00
Michael J. Spencer cff2b27bf4 [Object][ELF] Add a way to get the dynamic symbol table section.
llvm-svn: 174682
2013-02-07 23:37:58 +00:00
Michael J. Spencer 38243d8997 [Object][ELF] Add {begin,end}_elf_dynamic_symbols to non-virtually iterate over dynamic symbols.
llvm-svn: 174681
2013-02-07 23:37:46 +00:00
Anna Zaks 907e126be2 [analyzer] Remove redundant check as per Jordan's feedback.
llvm-svn: 174680
2013-02-07 23:29:22 +00:00
Anna Zaks 297176c393 [analyzer] Fix typo.
llvm-svn: 174679
2013-02-07 23:29:20 +00:00
Anna Zaks c89ad07d39 [analyzer] Report bugs when freeing memory with offset pointer
The malloc checker will now catch the case when a previously malloc'ed
region is freed, but the pointer passed to free does not point to the
start of the allocated memory. For example:

int *p1 = malloc(sizeof(int));
p1++;
free(p1); // warn

From the "memory.LeakPtrValChanged enhancement to unix.Malloc" entry
in the list of potential checkers.

A patch by Branden Archer!

llvm-svn: 174678
2013-02-07 23:05:47 +00:00
Anna Zaks acdc13cb00 [analyzer] Add pointer escape type param to checkPointerEscape callback
The checkPointerEscape callback previously did not specify how a
pointer escaped. This change includes an enum which describes the
different ways a pointer may escape. This enum is passed to the
checkPointerEscape callback when a pointer escapes. If the escape
is due to a function call, the call is passed. This changes
previous behavior where the call is passed as NULL if the escape
was due to indirectly invalidating the region the pointer referenced.

A patch by Branden Archer!

llvm-svn: 174677
2013-02-07 23:05:43 +00:00
Anna Zaks 7c1f408636 [analyzer] Don't reinitialize static globals more than once along a path
This patch makes sure that we do not reinitialize static globals when
the function is called more than once along a path. The motivation is
code with initialization patterns that rely on 2 static variables, where
one of them has an initializer while the other does not. Currently, we
reset the static variables with initializers on every visit to the
function along a path.

llvm-svn: 174676
2013-02-07 23:05:37 +00:00
Michael Ilseman 6092dc5455 Have InstCombine call SipmlifyCall when handling calls. Test case included.
llvm-svn: 174675
2013-02-07 23:01:35 +00:00
Douglas Gregor 4bedb499ea Form the default -fmodules-cache-path= properly.
llvm-svn: 174674
2013-02-07 22:59:12 +00:00
Enrico Granata 08ec0b6117 Renaming SBValueList::get() to
opaque_ptr since it returns a void* instead of an usable object.

llvm-svn: 174673
2013-02-07 22:57:46 +00:00
Fariborz Jahanian e499613d60 objective-C modern translator. More fixups for
modern meta-data abi translation. Still wip.
// rdar://13138459

llvm-svn: 174672
2013-02-07 22:50:40 +00:00
Nadav Rotem a9100f3609 fix 80-col violation and fix the docs.
llvm-svn: 174671
2013-02-07 22:34:07 +00:00
Enrico Granata d96f0682e5 Correct logging for function calls that return SBValueList
llvm-svn: 174670
2013-02-07 22:22:27 +00:00
Marshall Clow b6e5f854f5 Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
llvm-svn: 174669
2013-02-07 22:12:02 +00:00
Greg Clayton 64ff6c70da Be sure to set the data offset to zero if we actually mmap the entire ELF file.
llvm-svn: 174668
2013-02-07 21:49:54 +00:00
Daniel Dunbar d2cc63f10b [lit] Add a display function for lit.Test.TestResult.
llvm-svn: 174667
2013-02-07 21:34:34 +00:00
Akira Hatanaka a061281556 [mips] Make Filler a class and reduce indentation.
llvm-svn: 174666
2013-02-07 21:32:32 +00:00
Andrew Kaylor 213f6727c0 Fixing stale pointer problem in ELFObjectFile
llvm-svn: 174665
2013-02-07 21:30:54 +00:00
Eric Christopher 9006156a04 Formatting.
llvm-svn: 174664
2013-02-07 21:19:56 +00:00
Eric Christopher 7480433dd9 "Clean up" line section symbol emission by emitting the section
syms before constructing the compile units so we're not emitting
section references to sections not there already.

llvm-svn: 174663
2013-02-07 21:19:50 +00:00
Daniel Jasper 1455674741 clang-format: Don't put useless space in f( ::g()).
llvm-svn: 174662
2013-02-07 21:08:36 +00:00
Will Schmidt 02cb6f9e91 [patch] bug 15055 Add Unistd.h to OProfileWrapper.cpp
Add #include <unistd.h> to OProfileWrapper.cpp.   This provides the declarations for 'read' and 'close' that are otherwise missing, and result in 'error: <foo> was not declared in this scope'.

This matches the issue as reported in bug 15055 "Can no longer compile LLVM with --with-oprofile"

llvm-svn: 174661
2013-02-07 20:43:33 +00:00
Bill Schmidt b3cece13cf Constrain PowerPC autovectorization to fix bug 15041.
Certain vector operations don't vectorize well with the current
PowerPC implementation.  Element insert/extract performs poorly
without VSX support because Altivec requires going through memory.
SREM, UREM, and VSELECT all produce bad scalar code.

There's a lot of work to do for the cost model before
autovectorization will be tuned well, and this is not an attempt to
address the larger problem.

llvm-svn: 174660
2013-02-07 20:33:57 +00:00
Shankar Easwaran 710b4c8fa2 fix segment ordering of elf segments
llvm-svn: 174659
2013-02-07 20:33:55 +00:00
Shankar Easwaran 34ab70f1e6 add changes for layoutafter/layoutbefore/ingroup/layoutpass and test cases
llvm-svn: 174658
2013-02-07 20:16:12 +00:00
Akira Hatanaka 061d1ea5da [mips] Add definition of JALR instruction which has two register operands. Change the
original JALR instruction with one register operand to be a pseudo-instruction.

llvm-svn: 174657
2013-02-07 19:48:00 +00:00
Tom Stellard 1c822a8929 R600/SI: cleanup VGPR encoding
Remove all the unused code.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174656
2013-02-07 19:39:45 +00:00
Tom Stellard aac1889a84 R600/SI: Handle VGPR64 destination in copyPhysReg().
Allows nexuiz to run with radeonsi.

Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174655
2013-02-07 19:39:43 +00:00
Tom Stellard ecacb8010d R600/SI: Add pattern for mul.
20 more little piglits with radeonsi.

Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174654
2013-02-07 19:39:42 +00:00
Tom Stellard 8909380e71 R600/SI: simplify and fix SMRD encoding
The _SGPR variants where wrong.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174653
2013-02-07 19:39:40 +00:00
Tom Stellard 26075d58a2 R600/SI: add proper 64bit immediate support v2
v2: rebased on current upstream

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174652
2013-02-07 19:39:38 +00:00
Tom Stellard 4ded0c1c42 R600: Add an explicit default processor
This is for the case when no processor is passed to the backend.  This
prevents the

'' is not a recognized processor for this target (ignoring processor)

warning from being generated by clang.

llvm-svn: 174651
2013-02-07 19:39:34 +00:00
Michael Ilseman 5485729b9a Identify and simplify idempotent intrinsics. Test case included.
llvm-svn: 174650
2013-02-07 19:26:05 +00:00
Douglas Gregor 7861dc7991 Add missing header from r174648
llvm-svn: 174649
2013-02-07 19:15:44 +00:00
Douglas Gregor 560b7fa0c4 Retain all hidden methods in the global method pool, because they may become visible <rdar://problem/13172858>.
llvm-svn: 174648
2013-02-07 19:13:24 +00:00
Dmitri Gribenko 0b62f8a632 libclang: reduce CXString abuse
ContainerUSR is not really a CXString, but it should own the underlying memory
buffer.  Thus, it is better to change the type to std::string.  This will not
introduce extra copying overhead, since the workaround that is being removed
was already making a copy.

llvm-svn: 174647
2013-02-07 19:09:22 +00:00
Arnold Schwaighofer 3476fc8c82 Loop Vectorizer: Refactor Memory Cost Computation
We don't want too many classes in a pass and the classes obscure the details. I
was going a little overboard with object modeling here. Replace classes by
generic code that handles both loads and stores.

No functionality change intended.

llvm-svn: 174646
2013-02-07 19:05:21 +00:00
Douglas Gregor 35b04d6fd2 Rename -fmodule-cache-path <blah> to -fmodules-cache-path=<blah> for consistency.
llvm-svn: 174645
2013-02-07 19:01:24 +00:00
DeLesley Hutchins eb849c6bd5 Thread safety analysis: make sure that expressions in attributes are parsed
in an unevaluated context.

llvm-svn: 174644
2013-02-07 19:01:07 +00:00
Edwin Vane 37fea69391 Fix for combined loop and nullptr convert tests
The rewriter was previously reading the content buffer from the file itself.
Since we are now keeping the content in memory and writing to the file only
once, the rewriter's buffer (from the file) was not in sync with the
RefactoringTool's buffer. Adding an overrideFileContents call (similar to how
Clang-format handles for this) will resolve this issue.

Author: Jack Yang <jack.yang@intel.com>
Reviewers: gribozavr, klimek
llvm-svn: 174643
2013-02-07 18:49:23 +00:00
Marshall Clow 0749262a11 Belt and suspenders when calling sysconf
llvm-svn: 174642
2013-02-07 18:48:09 +00:00
Meador Inge 32dc724920 ADT: Correct APInt::getActiveWords for zero values
PR15138 was opened because of a segfault in the Bitcode writer.
The actual issue ended up being a bug in APInt where calls to
APInt::getActiveWords returns a bogus value when the APInt value
is 0.  This patch fixes the problem by ensuring that getActiveWords
returns 1 for 0 valued APInts.

llvm-svn: 174641
2013-02-07 18:36:50 +00:00
Chad Rosier b31d71367b Testcase for r174477.
llvm-svn: 174640
2013-02-07 18:32:25 +00:00
Michael J. Spencer 3a967eac1e [Object][ELF] Fix crash on no dynamic section.
llvm-svn: 174639
2013-02-07 18:26:45 +00:00
Enrico Granata 85425d77b8 <rdar://problem/13107151>
SBValueList was backed by a ValueObjectList. This caused us to lose track of the additional metadata in the ValueImpl that backs SBValue.
This checkin fixes that by backing SBValueList with ValueListImpl (that essentially wraps a vector<SBValue>).

llvm-svn: 174638
2013-02-07 18:23:56 +00:00
Marshall Clow 63f700e4d1 Another libc++ warning suppression on Linux; no functionality change
llvm-svn: 174637
2013-02-07 17:37:58 +00:00
Marshall Clow d58e0f5505 More libc++ warning suppression on Linux; no functionality change
llvm-svn: 174636
2013-02-07 17:20:56 +00:00
Dmitry Vyukov e679798315 tsan: fix suppress_java logic
llvm-svn: 174635
2013-02-07 17:12:28 +00:00