OSDN Git Service

android-x86/external-llvm-project.git
12 years agoRemove -enable-iv-rewrite, which has been unsupported since 3.0.
Andrew Trick [Thu, 22 Mar 2012 17:10:11 +0000 (17:10 +0000)]
Remove -enable-iv-rewrite, which has been unsupported since 3.0.

llvm-svn: 153260

12 years agoConvert -indvars tests that rely on SCEV expansion to -loop-reduce tests.
Andrew Trick [Thu, 22 Mar 2012 17:10:07 +0000 (17:10 +0000)]
Convert -indvars tests that rely on SCEV expansion to -loop-reduce tests.

llvm-svn: 153259

12 years agoRemove tests: indvars trivially preserves GEPs now.
Andrew Trick [Thu, 22 Mar 2012 17:09:46 +0000 (17:09 +0000)]
Remove tests: indvars trivially preserves GEPs now.

llvm-svn: 153258

12 years agoRemove test: trivial canonical IV test which is covered by other SCEV tests.
Andrew Trick [Thu, 22 Mar 2012 17:09:34 +0000 (17:09 +0000)]
Remove test: trivial canonical IV test which is covered by other SCEV tests.

llvm-svn: 153257

12 years agoTest scalar evolution directly instead of testing the result of
Andrew Trick [Thu, 22 Mar 2012 17:09:31 +0000 (17:09 +0000)]
Test scalar evolution directly instead of testing the result of
canonical indvars.

llvm-svn: 153256

12 years agoRemove redundant -enable-iv-rewrite=false flags from test cases.
Andrew Trick [Thu, 22 Mar 2012 17:09:04 +0000 (17:09 +0000)]
Remove redundant -enable-iv-rewrite=false flags from test cases.

llvm-svn: 153255

12 years ago[PCH] When we are replacing a decl in a chained PCH that is also a DeclContext,
Argyrios Kyrtzidis [Thu, 22 Mar 2012 16:08:04 +0000 (16:08 +0000)]
[PCH] When we are replacing a decl in a chained PCH that is also a DeclContext,
make sure to fully load its external lexical and visible declarations before
re-writing it.

rdar://10914192

llvm-svn: 153254

12 years agoAdded soft fail checks for the disassembler when decoding some corner cases of the...
Silviu Baranga [Thu, 22 Mar 2012 14:14:49 +0000 (14:14 +0000)]
Added soft fail checks for the disassembler when decoding some corner cases of the STRD, STRH, LDRD, LDRH, LDRSH and LDRSB instructions on ARM.

llvm-svn: 153252

12 years agoAdded soft fail cases for the disassembler when decoding LDRSBT, LDRHT or LDRSHT...
Silviu Baranga [Thu, 22 Mar 2012 13:24:43 +0000 (13:24 +0000)]
Added soft fail cases for the disassembler when decoding LDRSBT, LDRHT or LDRSHT instruction on ARM

llvm-svn: 153251

12 years agoAdded soft fail cases for the disassembler when decoding MUL instructions on ARM.
Silviu Baranga [Thu, 22 Mar 2012 13:14:39 +0000 (13:14 +0000)]
Added soft fail cases for the disassembler when decoding MUL instructions on ARM.

llvm-svn: 153250

12 years agoHandle two-byte short jumps in the relocated code.
Alexander Potapenko [Thu, 22 Mar 2012 11:29:53 +0000 (11:29 +0000)]
Handle two-byte short jumps in the relocated code.
After the instructions are moved to the branch island, fixupInstructions() expands every 2-byte ja/je instruction with a 1-byte offset into a 6-byte ja/je with 32-bit offset. The offset is fixed to point to the original function.

llvm-svn: 153249

12 years ago[python] Add negative MemoryBuffer testcase
Anders Waldenborg [Thu, 22 Mar 2012 11:23:52 +0000 (11:23 +0000)]
[python] Add negative MemoryBuffer testcase

llvm-svn: 153248

12 years agoUpdate front page to indicate that we do, in fact, support some of C++11.
Richard Smith [Thu, 22 Mar 2012 08:15:13 +0000 (08:15 +0000)]
Update front page to indicate that we do, in fact, support some of C++11.

llvm-svn: 153246

12 years agoRemove some unnecessary forward declarations.
Craig Topper [Thu, 22 Mar 2012 06:52:14 +0000 (06:52 +0000)]
Remove some unnecessary forward declarations.

llvm-svn: 153245

12 years ago"Teach" RetainCountChecker about dispatch_set_context, which can indirectly free...
Ted Kremenek [Thu, 22 Mar 2012 06:29:41 +0000 (06:29 +0000)]
"Teach" RetainCountChecker about dispatch_set_context, which can indirectly free its argument later.  Fixes <rdar://problem/11059275>.

llvm-svn: 153244

12 years agoRelax the FileCheck assertions in this test a touch. Previously the test
Chandler Carruth [Thu, 22 Mar 2012 06:22:13 +0000 (06:22 +0000)]
Relax the FileCheck assertions in this test a touch. Previously the test
relied on an artifact of how the inliner and subsequent passes in
clang's -O3 mode happen to treat basic blocks and the labels for the
basic blocks. In my work on the inliner, and changed this fundamental
assumption, and the label that was being checked on the entry basic
block will no longer appear in opt builds. There was no reason to expect
the label to always be present anyways, much to my regret.

I've changed the test to just ensure that we return an immediate
constant. If there are intervening instructions, that's bad, but not
really that relevant to the test.

I'd love it if others have a better way of checking that a function body
contains only a 'ret' instruction that isn't dependent on whether or not
the entry block receives a label...

llvm-svn: 153243

12 years agoFix broken CFG when an initializer is a statement expression that starts with a while...
Ted Kremenek [Thu, 22 Mar 2012 05:57:43 +0000 (05:57 +0000)]
Fix broken CFG when an initializer is a statement expression that starts with a while loop (PR 12325).

llvm-svn: 153242

12 years agoRevert a series of commits to MCJIT to get the build working in CMake
Chandler Carruth [Thu, 22 Mar 2012 05:44:06 +0000 (05:44 +0000)]
Revert a series of commits to MCJIT to get the build working in CMake
(and hopefully on Windows). The bots have been down most of the day
because of this, and it's not clear to me what all will be required to
fix it.

The commits started with r153205, then r153207, r153208, and r153221.
The first commit seems to be the real culprit, but I couldn't revert
a smaller number of patches.

When resubmitting, r153207 and r153208 should be folded into r153205,
they were simple build fixes.

llvm-svn: 153241

12 years agoPPC::DBG_VALUE must use Reg+Imm frame-index elimination even for large offsets. Fixes...
Hal Finkel [Thu, 22 Mar 2012 05:28:19 +0000 (05:28 +0000)]
PPC::DBG_VALUE must use Reg+Imm frame-index elimination even for large offsets. Fixes PR12203.

I don't have a small test case yet, but I'll try to construct one.

llvm-svn: 153240

12 years agoFixed a bug with the r153228 check-in earlier today in that the cached watchpoint
Johnny Chen [Thu, 22 Mar 2012 05:10:43 +0000 (05:10 +0000)]
Fixed a bug with the r153228 check-in earlier today in that the cached watchpoint
member variables were not reset appropriately.

llvm-svn: 153239

12 years agoadd load/store volatility control to the C API, patch by Yiannis Tsiouris!
Chris Lattner [Thu, 22 Mar 2012 03:54:15 +0000 (03:54 +0000)]
add load/store volatility control to the C API, patch by Yiannis Tsiouris!

llvm-svn: 153238

12 years agodon't use "signed", just something I noticed in patches flying by.
Chris Lattner [Thu, 22 Mar 2012 03:46:58 +0000 (03:46 +0000)]
don't use "signed", just something I noticed in patches flying by.

llvm-svn: 153237

12 years agoDuring the instantiation of a class template specialization, that
Richard Smith [Thu, 22 Mar 2012 03:35:28 +0000 (03:35 +0000)]
During the instantiation of a class template specialization, that
specialization is known to be incomplete. If we're asked to try to
complete it, don't attempt to instantiate it again -- that can lead
to stack overflow, and to rejects-valids if the class being incomplete
is not an error.

llvm-svn: 153236

12 years agoSimplify DataRecursiveIntBinOpEvaluator::VisitBinOp() a bit and make sure we don't
Argyrios Kyrtzidis [Thu, 22 Mar 2012 02:13:06 +0000 (02:13 +0000)]
Simplify DataRecursiveIntBinOpEvaluator::VisitBinOp() a bit and make sure we don't
evaluate RHS if LHS could not be evaluated and keepEvaluatingAfterFailure() is false.

llvm-svn: 153235

12 years agoIn erroneous inline assembly we could mistakenly try to access the
Eric Christopher [Thu, 22 Mar 2012 01:33:51 +0000 (01:33 +0000)]
In erroneous inline assembly we could mistakenly try to access the
metadata operand as an actual operand, leading to an assert. Error
out in this case.

rdar://11007633

llvm-svn: 153234

12 years agoFixed a bug in the disassembler where we did
Sean Callanan [Thu, 22 Mar 2012 01:10:50 +0000 (01:10 +0000)]
Fixed a bug in the disassembler where we did
not properly print the load addresses for
PC-relative jumps.

llvm-svn: 153233

12 years ago[analyzer] Malloc: drop symbols captured by blocks.
Anna Zaks [Thu, 22 Mar 2012 00:57:20 +0000 (00:57 +0000)]
[analyzer] Malloc: drop symbols captured by blocks.

llvm-svn: 153232

12 years agoSince we are having issues with the new LLVM MC disassembler, we can have
Greg Clayton [Thu, 22 Mar 2012 00:49:15 +0000 (00:49 +0000)]
Since we are having issues with the new LLVM MC disassembler, we can have
them both installed with the LLVM MC version being the default. I renamed the
name of the LLVM MC disassembler plug-in to "llvm-mc" and the LLVM enhanced
disassembly plug-in to "llvm-edis" and they can both be installed for now.

To use the "llvm-edis" disassembler, you can just specify it while disassembling:

(lldb) disassemble --plugin llvm-edis --name main
(lldb) disassemble --plugin llvm-mc --name main

This will allow us to compare the output of the two disassembler and eventually
deprecate the old one when the new one is ready. But it does use the new disassembler
by default so we continue to test it on a daily basis.

llvm-svn: 153231

12 years ago[fast-isel] Fold "urem x, pow2" -> "and x, pow2-1". This should fix the 271%
Chad Rosier [Thu, 22 Mar 2012 00:21:17 +0000 (00:21 +0000)]
[fast-isel] Fold "urem x, pow2" -> "and x, pow2-1".  This should fix the 271%
execution-time regression for nsieve-bits on the ARMv7 -O0 -g nightly tester.
This may also improve compile-time on architectures that would otherwise
generate a libcall for urem (e.g., ARM) or fall back to the DAG selector.
rdar://10810716

llvm-svn: 153230

12 years agoWIP snapshot of hardware watchpoints for arm. A simple watchpoint has triggered.
Johnny Chen [Thu, 22 Mar 2012 00:08:13 +0000 (00:08 +0000)]
WIP snapshot of hardware watchpoints for arm.  A simple watchpoint has triggered.
However, the debugserver cannot get past the instruction which triggered the watchpoint.
So a workaround is in place for the time being which disables the triggered watchpoint
before resuming.

Lots of commented out printf's remain in the source which needs to be cleaned up.

WIP rdar://problem/9667960

llvm-svn: 153228

12 years agomodern objective-c translator: Change declaration of
Fariborz Jahanian [Wed, 21 Mar 2012 23:41:04 +0000 (23:41 +0000)]
modern objective-c translator: Change declaration of
all objc_msgSend unctions to void parameters and void return.
// rdar://11094890

llvm-svn: 153227

12 years agoChange the binary operator data recursive evaluator to not stop at the first
Richard Trieu [Wed, 21 Mar 2012 23:30:30 +0000 (23:30 +0000)]
Change the binary operator data recursive evaluator to not stop at the first
non-constant value encountered.  This allows the evaluator to deduce that
expressions like (x < 5 || true) is equal to true.  Previously, it would visit
x and determined that the entire expression is could not evaluated to a
constant.

This fixes PR12318.

llvm-svn: 153226

12 years ago[PathV2]: Fix bug in create_directories which caused infinite recursion on
Michael J. Spencer [Wed, 21 Mar 2012 23:09:14 +0000 (23:09 +0000)]
[PathV2]: Fix bug in create_directories which caused infinite recursion on
som inputs.

Bug found and fix proposed by Kal Conley!

llvm-svn: 153225

12 years agoAdd a release note for r145714.
Nick Lewycky [Wed, 21 Mar 2012 22:58:28 +0000 (22:58 +0000)]
Add a release note for r145714.

llvm-svn: 153224

12 years agoCommit missing function prototype.
Greg Clayton [Wed, 21 Mar 2012 22:50:54 +0000 (22:50 +0000)]
Commit missing function prototype.

llvm-svn: 153223

12 years agomisched: tag a few XFAILs that I plan to fix
Andrew Trick [Wed, 21 Mar 2012 22:31:31 +0000 (22:31 +0000)]
misched: tag a few XFAILs that I plan to fix

llvm-svn: 153222

12 years agoRe-factored RuntimeDyld.
Danil Malyshev [Wed, 21 Mar 2012 21:06:29 +0000 (21:06 +0000)]
Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

llvm-svn: 153221

12 years agoRemove unused variable, fix indentation.
Benjamin Kramer [Wed, 21 Mar 2012 21:03:48 +0000 (21:03 +0000)]
Remove unused variable, fix indentation.

llvm-svn: 153220

12 years agoFor enums with no tag name, display its location in
Fariborz Jahanian [Wed, 21 Mar 2012 20:56:29 +0000 (20:56 +0000)]
For enums with no tag name, display its location in
the diagnostic instead of displaying ''.
// rdar://11082110

llvm-svn: 153219

12 years agoFix ARM disassembly of VST1 and VST2 instructions with writeback. And add test
Kevin Enderby [Wed, 21 Mar 2012 20:54:32 +0000 (20:54 +0000)]
Fix ARM disassembly of VST1 and VST2 instructions with writeback.  And add test
case for all opcodes handed by DecodeVSTInstruction() in ARMDisassembler.cpp .

llvm-svn: 153218

12 years agofixes the diagnostic issued in // rdar://11069896
Fariborz Jahanian [Wed, 21 Mar 2012 20:28:39 +0000 (20:28 +0000)]
fixes the diagnostic issued in // rdar://11069896

llvm-svn: 153217

12 years agoReport the natural alignment of unsigned long long, not the preferred alignment.
Chad Rosier [Wed, 21 Mar 2012 20:20:47 +0000 (20:20 +0000)]
Report the natural alignment of unsigned long long, not the preferred alignment.
rdar://11054144

llvm-svn: 153216

12 years agoFix windows compilation warning. Patch by Micah.
Jan Sjödin [Wed, 21 Mar 2012 20:00:30 +0000 (20:00 +0000)]
Fix windows compilation warning. Patch by Micah.

llvm-svn: 153215

12 years agoTry to get cpath.c passing on windows, using lit's new ${pathsep} variable.
Nico Weber [Wed, 21 Mar 2012 19:57:21 +0000 (19:57 +0000)]
Try to get cpath.c passing on windows, using lit's new ${pathsep} variable.

llvm-svn: 153214

12 years agoAdd a ${pathsep} variable to lit that expands to : (or ; on win32).
Nico Weber [Wed, 21 Mar 2012 19:56:42 +0000 (19:56 +0000)]
Add a ${pathsep} variable to lit that expands to : (or ; on win32).

This is in braces so that it doesn't conflict with the existing %p.
It uses braces instead of parens because parens would have to be
regex-escaped.

llvm-svn: 153213

12 years ago[analyzer] Malloc: Utter the name of the leaked variable.
Anna Zaks [Wed, 21 Mar 2012 19:45:08 +0000 (19:45 +0000)]
[analyzer] Malloc: Utter the name of the leaked variable.
Specifically, we use the last store of the leaked symbol in the leak diagnostic.
(No support for struct fields since the malloc checker doesn't track those
yet.)

+ Infrastructure to track the regions used in store evaluations.
This approach is more precise than iterating the store to
obtain the region bound to the symbol, which is used in RetainCount
checker. The region corresponds to what is uttered in the code in the
last store and we do not rely on the store implementation to support
this functionality.

llvm-svn: 153212

12 years ago[analyser] Factor out FindUniqueBinding from RetainCount checker.
Anna Zaks [Wed, 21 Mar 2012 19:45:01 +0000 (19:45 +0000)]
[analyser] Factor out FindUniqueBinding from RetainCount checker.

So that others could use it as well. No functionality change.

llvm-svn: 153211

12 years ago[analyzer] Re-enable the test disabled by r152969.
Anna Zaks [Wed, 21 Mar 2012 19:44:57 +0000 (19:44 +0000)]
[analyzer] Re-enable the test disabled by r152969.
(The fix was committed in r152982.)

llvm-svn: 153210

12 years ago(no commit message)
Danil Malyshev [Wed, 21 Mar 2012 19:13:08 +0000 (19:13 +0000)]
(no commit message)

llvm-svn: 153208

12 years agoMissed getPointerToNamedFunction() declaration.
Danil Malyshev [Wed, 21 Mar 2012 18:47:10 +0000 (18:47 +0000)]
Missed getPointerToNamedFunction() declaration.

llvm-svn: 153207

12 years agoAdd missing watchpoint stop info creation logic for arm on the debugger side.
Johnny Chen [Wed, 21 Mar 2012 18:28:25 +0000 (18:28 +0000)]
Add missing watchpoint stop info creation logic for arm on the debugger side.

WIP for rdar://problem/9667960

llvm-svn: 153206

12 years agoBased on this discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of...
Danil Malyshev [Wed, 21 Mar 2012 18:26:47 +0000 (18:26 +0000)]
Based on this discussion: lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html
1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager
2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager.

llvm-svn: 153205

12 years agoAdd "frame info" command to the "Examining Thread State" section, as suggested by...
Johnny Chen [Wed, 21 Mar 2012 18:14:37 +0000 (18:14 +0000)]
Add "frame info" command to the "Examining Thread State" section, as suggested by Andrew Trick.

llvm-svn: 153204

12 years agoChecking a build_vector for an all-ones value.
Jim Grosbach [Wed, 21 Mar 2012 17:48:04 +0000 (17:48 +0000)]
Checking a build_vector for an all-ones value.

Type legalization can zero-extend the elements of the build_vector node, so,
for example, we may have an <8 x i8> with i32 elements of value 255. That
should return 'true' for the vector being all ones.

llvm-svn: 153203

12 years agoDuplicated code is bad. At least make it consistent.
Bob Wilson [Wed, 21 Mar 2012 17:19:12 +0000 (17:19 +0000)]
Duplicated code is bad.  At least make it consistent.

The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both
Toolchain.cpp and Tools.cpp.  This stuff needs a thorough overhaul.  In the
meantime, this patch at least makes them consistent.  One version had been
converted to use StringSwitch, and the other version had new Cortex M-series
processors added.

llvm-svn: 153202

12 years agoAdded some hardening to make sure that we don't
Sean Callanan [Wed, 21 Mar 2012 17:13:20 +0000 (17:13 +0000)]
Added some hardening to make sure that we don't
use QualType contents unchecked.

llvm-svn: 153201

12 years agoAllow void blocks to return witn a void expression in
Fariborz Jahanian [Wed, 21 Mar 2012 16:45:13 +0000 (16:45 +0000)]
Allow void blocks to return witn a void expression in
c-mode to match behavior with void functions in c. Issue
warning with -pedantic. // rdar://11069896

llvm-svn: 153200

12 years agoAdded a local patch to reflect an LLVM fix for
Sean Callanan [Wed, 21 Mar 2012 16:42:08 +0000 (16:42 +0000)]
Added a local patch to reflect an LLVM fix for
relocations (LLVM revision 153147).  Now when
we report section locations in the target process,
LLVM will apply both those relocations whose
targets are in that section and those relocations
which reside in that section and point to other
sections.

llvm-svn: 153199

12 years agoFor Darwin, do not let -mcpu override the -arch option. <rdar://11059238>
Bob Wilson [Wed, 21 Mar 2012 16:31:37 +0000 (16:31 +0000)]
For Darwin, do not let -mcpu override the -arch option.  <rdar://11059238>

On Darwin the architecture and the corresponding Mach-O slice is typically
specified with -arch.  If not, it defaults to the current host architecture.
Do not use -mcpu to override the -arch value.  This is only an issue when
people need to use specialized code for a non-default CPU (hopefully guarded
by run-time checks to detect the current processor).  The -mcpu option is
still used for the -target-cpu option to clang, but this patch causes it to
not be used to set the architecture in the target triple.

llvm-svn: 153197

12 years agomodern objective-c rewriter: remove 'const' from
Fariborz Jahanian [Wed, 21 Mar 2012 16:23:16 +0000 (16:23 +0000)]
modern objective-c rewriter: remove 'const' from
pointer field declarations in several meta-data.
// rdar://11079898

llvm-svn: 153196

12 years agoRemoved repeated word (of of).
Patrick Beard [Wed, 21 Mar 2012 16:22:53 +0000 (16:22 +0000)]
Removed repeated word (of of).

llvm-svn: 153195

12 years agoIt appears that the standard accidentally removed the default constructor for error_c...
Howard Hinnant [Wed, 21 Mar 2012 16:18:57 +0000 (16:18 +0000)]
It appears that the standard accidentally removed the default constructor for error_category.  I'm putting it back in.  This fixes llvm.org/bugs/show_bug.cgi?id=12321.

llvm-svn: 153194

12 years agoUndo previous patch as I checked more than I intended.
Fariborz Jahanian [Wed, 21 Mar 2012 16:18:21 +0000 (16:18 +0000)]
Undo previous patch as I checked more than I intended.

llvm-svn: 153193

12 years agomodern objective-c rewriter: remove 'const' from
Fariborz Jahanian [Wed, 21 Mar 2012 16:17:22 +0000 (16:17 +0000)]
modern objective-c rewriter: remove 'const' from
pointer field declarations in several meta-data.
// rdar://11079898

llvm-svn: 153192

12 years ago[asan] extend the test for long double bug
Kostya Serebryany [Wed, 21 Mar 2012 15:29:28 +0000 (15:29 +0000)]
[asan] extend the test for long double bug

llvm-svn: 153190

12 years ago[asan] fix one more bug related to long double
Kostya Serebryany [Wed, 21 Mar 2012 15:28:50 +0000 (15:28 +0000)]
[asan] fix one more bug related to long double

llvm-svn: 153189

12 years ago[asan] one more try to remove pthread.h from asan_interceptors.cc
Alexey Samsonov [Wed, 21 Mar 2012 15:02:39 +0000 (15:02 +0000)]
[asan] one more try to remove pthread.h from asan_interceptors.cc

llvm-svn: 153188

12 years ago[asan] add missing declarations from string.h and remove this header
Alexey Samsonov [Wed, 21 Mar 2012 14:33:15 +0000 (14:33 +0000)]
[asan] add missing declarations from string.h and remove this header

llvm-svn: 153187

12 years ago[asan] use extern declaraions of libc functions on Win and on Mac
Alexey Samsonov [Wed, 21 Mar 2012 14:22:28 +0000 (14:22 +0000)]
[asan] use extern declaraions of libc functions on Win and on Mac

llvm-svn: 153186

12 years agoPut Is64BitMemOperand into !defined(NDEBUG) for now.
Joerg Sonnenberger [Wed, 21 Mar 2012 14:09:26 +0000 (14:09 +0000)]
Put Is64BitMemOperand into !defined(NDEBUG) for now.

llvm-svn: 153185

12 years agoUse a signed value for this enum to avoid spuriuos warnings from gcc.
Benjamin Kramer [Wed, 21 Mar 2012 13:48:11 +0000 (13:48 +0000)]
Use a signed value for this enum to avoid spuriuos warnings from gcc.

llvm-svn: 153184

12 years ago[asan]: remove signal.h system header from interceptors
Alexey Samsonov [Wed, 21 Mar 2012 13:44:39 +0000 (13:44 +0000)]
[asan]: remove signal.h system header from interceptors

llvm-svn: 153183

12 years ago[asan]: substitute extern decls with system header in asan_mac.cc
Alexey Samsonov [Wed, 21 Mar 2012 13:00:04 +0000 (13:00 +0000)]
[asan]: substitute extern decls with system header in asan_mac.cc

llvm-svn: 153182

12 years ago[asan] merge mac-specific interceptors into one function
Alexey Samsonov [Wed, 21 Mar 2012 12:42:00 +0000 (12:42 +0000)]
[asan] merge mac-specific interceptors into one function

llvm-svn: 153180

12 years ago[asan]: remove asan_mac.h
Alexey Samsonov [Wed, 21 Mar 2012 12:29:54 +0000 (12:29 +0000)]
[asan]: remove asan_mac.h

llvm-svn: 153179

12 years ago[asan]: start removing os-specific asan_mac.h - move inclusion of mac system header...
Alexey Samsonov [Wed, 21 Mar 2012 12:03:44 +0000 (12:03 +0000)]
[asan]: start removing os-specific asan_mac.h - move inclusion of mac system header to asan_mac.cc

llvm-svn: 153178

12 years ago[asan] Support for %z to Printf()
Evgeniy Stepanov [Wed, 21 Mar 2012 11:32:46 +0000 (11:32 +0000)]
[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

12 years agoTeach instsimplify to gracefully degrade in the presence of instructions
Chandler Carruth [Wed, 21 Mar 2012 10:58:47 +0000 (10:58 +0000)]
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

12 years agos/Printf/Report for libc interceptors (need this to debug the potential double interc...
Alexander Potapenko [Wed, 21 Mar 2012 09:33:05 +0000 (09:33 +0000)]
s/Printf/Report for libc interceptors (need this to debug the potential double interception)

llvm-svn: 153175

12 years ago[python] Add some paths where to find test binary
Anders Waldenborg [Wed, 21 Mar 2012 08:34:58 +0000 (08:34 +0000)]
[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

12 years ago[python] Mark get_test_binary as not being a test
Anders Waldenborg [Wed, 21 Mar 2012 08:18:19 +0000 (08:18 +0000)]
[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

12 years agolit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python...
NAKAMURA Takumi [Wed, 21 Mar 2012 07:49:44 +0000 (07:49 +0000)]
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

12 years agoFinish organizing C API docs.
Gregory Szorc [Wed, 21 Mar 2012 07:28:27 +0000 (07:28 +0000)]
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

12 years agoFor the annals of subtle but terrible bugs: fix a longstanding bug
John McCall [Wed, 21 Mar 2012 06:57:19 +0000 (06:57 +0000)]
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

12 years agoclang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.
NAKAMURA Takumi [Wed, 21 Mar 2012 06:25:42 +0000 (06:25 +0000)]
clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.

llvm-svn: 153167

12 years agoFix generation of the address size override prefix. Add assertions for
Joerg Sonnenberger [Wed, 21 Mar 2012 05:48:07 +0000 (05:48 +0000)]
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

12 years agoI meant to disable this test, not XFAIL it
Andrew Trick [Wed, 21 Mar 2012 05:18:53 +0000 (05:18 +0000)]
I meant to disable this test, not XFAIL it

llvm-svn: 153165

12 years agoFixed the ability to load a module from a path by using just a UUID. After
Greg Clayton [Wed, 21 Mar 2012 04:25:00 +0000 (04:25 +0000)]
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

12 years agomisched: beginning to add unit tests
Andrew Trick [Wed, 21 Mar 2012 04:12:19 +0000 (04:12 +0000)]
misched: beginning to add unit tests

llvm-svn: 153163

12 years agomisched: fix LiveInterval update for bottom-up scheduling
Andrew Trick [Wed, 21 Mar 2012 04:12:16 +0000 (04:12 +0000)]
misched: fix LiveInterval update for bottom-up scheduling

llvm-svn: 153162

12 years agomisched: trace LiveIntervals after scheduling.
Andrew Trick [Wed, 21 Mar 2012 04:12:12 +0000 (04:12 +0000)]
misched: trace LiveIntervals after scheduling.

llvm-svn: 153161

12 years agomisched: obvious iterator update fixes for bottom-up.
Andrew Trick [Wed, 21 Mar 2012 04:12:10 +0000 (04:12 +0000)]
misched: obvious iterator update fixes for bottom-up.

llvm-svn: 153160

12 years agomisched: cleanup main loop
Andrew Trick [Wed, 21 Mar 2012 04:12:07 +0000 (04:12 +0000)]
misched: cleanup main loop

llvm-svn: 153159

12 years agomisched: fix LI update for bottom-up.
Andrew Trick [Wed, 21 Mar 2012 04:12:01 +0000 (04:12 +0000)]
misched: fix LI update for bottom-up.

llvm-svn: 153158

12 years agoOrganize LLVM C API docs into doxygen modules; add docs
Gregory Szorc [Wed, 21 Mar 2012 03:54:29 +0000 (03:54 +0000)]
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

12 years agoRewriteModernObjC.cpp: Don't expose temporary std::string with StringRef. (StringRef...
NAKAMURA Takumi [Wed, 21 Mar 2012 03:21:46 +0000 (03:21 +0000)]
RewriteModernObjC.cpp: Don't expose temporary std::string with StringRef. (StringRef)getName() can be used here.

llvm-svn: 153156

12 years agoAdd typecast to silence -Wswitch warning introduced by r153153.
Craig Topper [Wed, 21 Mar 2012 02:28:53 +0000 (02:28 +0000)]
Add typecast to silence -Wswitch warning introduced by r153153.

llvm-svn: 153155

12 years agoSpacing fixes and using 'unsigned' instead of 'int' to index to select shuffle elemen...
Craig Topper [Wed, 21 Mar 2012 02:14:01 +0000 (02:14 +0000)]
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

12 years agoIncremental big endian patch by Jack Carter.
Akira Hatanaka [Wed, 21 Mar 2012 00:52:01 +0000 (00:52 +0000)]
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

12 years agoTest case for rdar://problem/11055105, a bug with the instantiation
John McCall [Wed, 21 Mar 2012 00:45:33 +0000 (00:45 +0000)]
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