platform/upstream/llvm.git
11 years agoMove m_destroy_in_process to Process (from ProcessKDP) since it is generally useful,
Jim Ingham [Fri, 1 Mar 2013 20:04:25 +0000 (20:04 +0000)]
Move m_destroy_in_process to Process (from ProcessKDP) since it is generally useful,
and use it to keep from doing the OS Plugin UpdateThreadList while destroying, since
if that does anything that requires the API lock it may deadlock against whoever is
running the Process::Destroy.

<rdar://problem/13308627>

llvm-svn: 176375

11 years agoNo need to force-create clang-tools-extra lit.site.cfg
Edwin Vane [Fri, 1 Mar 2013 19:58:58 +0000 (19:58 +0000)]
No need to force-create clang-tools-extra lit.site.cfg

The make (all) target takes care of creating lit configs and auto-generating
tests. The problem with the original 'lit.site.cfg' target is it's not
recursive and doesn't fully create everything necessary for testing
clang-tools-extra.

llvm-svn: 176374

11 years agoFix recursive make in clang-tools-extra
Edwin Vane [Fri, 1 Mar 2013 19:50:52 +0000 (19:50 +0000)]
Fix recursive make in clang-tools-extra

Autoconf make (all) now properly recurses from tools/extra/Makefile into
tools/extra/test/Makefile and tools/extra/test/cpp11-migrate/Makefile. The
'all' target is responsible for creating lit config files and autogenerating
tests. Subsequent 'check-all' targets will properly work.

Re-enabling UseAuto/iterator.cpp test.

General clean-up of clang-tools-extra makefiles; removing dead targets and
removing duplicated pieces of llvm/Makefile.rules.

llvm-svn: 176373

11 years agocpp11-migrate: Factor out duplicate code in UseNullPtr
Stefanus Du Toit [Fri, 1 Mar 2013 19:47:09 +0000 (19:47 +0000)]
cpp11-migrate: Factor out duplicate code in UseNullPtr

This moves the actual replacement code into a separate
function. There is still a bit of code duplication to
go from macros to expansion areas, but that code will
need to be fixed anyways to resolve bugs around macro
replacement.

Reviewed by: Tareq Siraj, Edwin Vane

llvm-svn: 176372

11 years ago[analyzer] Suppress paths involving a reference whose rvalue is null.
Jordan Rose [Fri, 1 Mar 2013 19:45:10 +0000 (19:45 +0000)]
[analyzer] Suppress paths involving a reference whose rvalue is null.

Most map types have an operator[] that inserts a new element if the key
isn't found, then returns a reference to the value slot so that you can
assign into it. However, if the value type is a pointer, it will be
initialized to null. This is usually no problem.

However, if the user /knows/ the map contains a value for a particular key,
they may just use it immediately:

   // From ClangSACheckersEmitter.cpp
   recordGroupMap[group]->Checkers

In this case the analyzer reports a null dereference on the path where the
key is not in the map, even though the user knows that path is impossible
here. They could silence the warning by adding an assertion, but that means
splitting up the expression and introducing a local variable. (Note that
the analyzer has no way of knowing that recordGroupMap[group] will return
the same reference if called twice in a row!)

We already have logic that says a null dereference has a high chance of
being a false positive if the null came from an inlined function. This
patch simply extends that to references whose rvalues are null as well,
silencing several false positives in LLVM.

<rdar://problem/13239854>

llvm-svn: 176371

11 years agomove dynamic linking atoms to Atoms.h
Shankar Easwaran [Fri, 1 Mar 2013 19:33:42 +0000 (19:33 +0000)]
move dynamic linking atoms to Atoms.h

llvm-svn: 176370

11 years agoAdd regression tests (WORKSFORME)
Michael Liao [Fri, 1 Mar 2013 19:23:37 +0000 (19:23 +0000)]
Add regression tests (WORKSFORME)

- These tests wont't crash on trunk but would be better to add them so that
  they don't break again in the future.

llvm-svn: 176369

11 years agoGenerate an error message instead of asserting or segfaulting when we can't
Chad Rosier [Fri, 1 Mar 2013 19:12:05 +0000 (19:12 +0000)]
Generate an error message instead of asserting or segfaulting when we can't
handle indirect register inputs.
rdar://13322011

llvm-svn: 176367

11 years agoLoopVectorize: Don't hang forever if a PHI only has skipped PHI uses.
Benjamin Kramer [Fri, 1 Mar 2013 19:07:31 +0000 (19:07 +0000)]
LoopVectorize: Don't hang forever if a PHI only has skipped PHI uses.

Fixes PR15384.

llvm-svn: 176366

11 years agoCache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.
Michael Ilseman [Fri, 1 Mar 2013 18:48:54 +0000 (18:48 +0000)]
Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.

This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).

Patch by Jean-Luc Duprat!

llvm-svn: 176365

11 years agoFix PR10475
Michael Liao [Fri, 1 Mar 2013 18:40:30 +0000 (18:40 +0000)]
Fix PR10475

- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
  but TLI.getShiftAmountTy() so far only return scalar type. As a
  result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
  TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
  return target-specificed scalar type or the same vector type as the
  1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
  type.

llvm-svn: 176364

11 years agoAdd support for using non-pic code for arm and thumb1 when emitting the sjlj
Chad Rosier [Fri, 1 Mar 2013 18:30:38 +0000 (18:30 +0000)]
Add support for using non-pic code for arm and thumb1 when emitting the sjlj
dispatch code.  As far as I can tell the thumb2 code is behaving as expected.
I was able to compile and run the associated test case for both arm and thumb1.
rdar://13066352

llvm-svn: 176363

11 years agoAdd a test case for static member variables
Daniel Malea [Fri, 1 Mar 2013 18:25:42 +0000 (18:25 +0000)]
Add a test case for static member variables
- expected to fail across the board due to llvm.org/pr15401

Patch by Ashok Thirumurthi!

llvm-svn: 176362

11 years agoRemove whitespace at end of file.
Daniel Jasper [Fri, 1 Mar 2013 18:11:39 +0000 (18:11 +0000)]
Remove whitespace at end of file.

This fixes the rest of llvm.org/PR15062.

llvm-svn: 176361

11 years agoFix string warning I introduced with indirect function support.
Matt Kopec [Fri, 1 Mar 2013 17:44:31 +0000 (17:44 +0000)]
Fix string warning I introduced with indirect function support.

llvm-svn: 176360

11 years agoR600/SI: fix sampler tests after fixing wait insertions
Christian Konig [Fri, 1 Mar 2013 17:39:05 +0000 (17:39 +0000)]
R600/SI: fix sampler tests after fixing wait insertions

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176359

11 years agoHexagon: Add constant extender support framework.
Jyotsna Verma [Fri, 1 Mar 2013 17:37:13 +0000 (17:37 +0000)]
Hexagon: Add constant extender support framework.

llvm-svn: 176358

11 years agoUpdate TestCallStdStringFunction to expected fail for gcc and account for multiple...
Matt Kopec [Fri, 1 Mar 2013 17:29:16 +0000 (17:29 +0000)]
Update TestCallStdStringFunction to expected fail for gcc and account for multiple breakpoint locations.

Patch from Ashok Thirumurthi.

llvm-svn: 176357

11 years agoCorrectly format arrays of pointers and function types.
Daniel Jasper [Fri, 1 Mar 2013 17:13:29 +0000 (17:13 +0000)]
Correctly format arrays of pointers and function types.

Before:
void f(Type(*parameter)[10]) {}
int(*func)(void *);

After:
void f(Type (*parameter)[10]) {}
int (*func)(void *);

llvm-svn: 176356

11 years ago[PCH] Remove building a SmallPtrSet that is not actually used for anything.
Argyrios Kyrtzidis [Fri, 1 Mar 2013 17:01:31 +0000 (17:01 +0000)]
[PCH] Remove building a SmallPtrSet that is not actually used for anything.

llvm-svn: 176354

11 years agotest commit to use consistent comment notation.
Peng Cheng [Fri, 1 Mar 2013 16:49:35 +0000 (16:49 +0000)]
test commit to use consistent comment notation.

llvm-svn: 176353

11 years agoNormal indent for last element of builder-type call.
Daniel Jasper [Fri, 1 Mar 2013 16:48:32 +0000 (16:48 +0000)]
Normal indent for last element of builder-type call.

In builder type call, we indent to the laster function calls.
However, for the last element of such a call, we don't need to do
so, as that normally just wastes space and does not increase
readability.

Before:
aaaaaa->aaaaaa->aaaaaa( // break
                  aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa
    ->aaaaaaaaaaaaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
aaaaaa->aaaaaa->aaaaaa( // break
    aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 176352

11 years agoRemove trailing whitespace of line comments.
Daniel Jasper [Fri, 1 Mar 2013 16:45:59 +0000 (16:45 +0000)]
Remove trailing whitespace of line comments.

This fixed llvm.org/PR15378.

llvm-svn: 176351

11 years agoImplements breaking string literals at slashes.
Manuel Klimek [Fri, 1 Mar 2013 13:29:19 +0000 (13:29 +0000)]
Implements breaking string literals at slashes.

We now break at a slash if we do not find a space to break on.

Also fixes a bug where we would go over the limit when breaking the
second line.

llvm-svn: 176350

11 years agoImplement fallback split point for string literals.
Manuel Klimek [Fri, 1 Mar 2013 13:14:08 +0000 (13:14 +0000)]
Implement fallback split point for string literals.

If we don't find a natural split point (currently space) in a string
literal protruding over the line, we just split at the last possible
point.

llvm-svn: 176349

11 years agoGCInfoDeleter code cleanup after r175528
Yiannis Tsiouris [Fri, 1 Mar 2013 11:40:32 +0000 (11:40 +0000)]
GCInfoDeleter code cleanup after r175528

Remove GCInfoDeleter from passes and comments.

llvm-svn: 176347

11 years agoR600/SI: handle all registers in copyPhysReg v2
Christian Konig [Fri, 1 Mar 2013 09:46:27 +0000 (09:46 +0000)]
R600/SI: handle all registers in copyPhysReg v2

v2: based on Michels patch, but now allows copying of all registers sizes.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176346

11 years agoR600/SI: remove S_MOV immediate patterns
Christian Konig [Fri, 1 Mar 2013 09:46:22 +0000 (09:46 +0000)]
R600/SI: remove S_MOV immediate patterns

They won't match anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176345

11 years agoR600/SI: remove GPR*AlignEncode
Christian Konig [Fri, 1 Mar 2013 09:46:17 +0000 (09:46 +0000)]
R600/SI: remove GPR*AlignEncode

It's much easier to specify the encoding with tablegen directly.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176344

11 years agoR600/SI: fix warning about overloaded virtual
Christian Konig [Fri, 1 Mar 2013 09:46:11 +0000 (09:46 +0000)]
R600/SI: fix warning about overloaded virtual

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176343

11 years agoR600/SI: fix inserting waits for unordered defines
Christian Konig [Fri, 1 Mar 2013 09:46:04 +0000 (09:46 +0000)]
R600/SI: fix inserting waits for unordered defines

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176342

11 years agoGCC thinks that this variable might be used uninitialized (it isn't).
Duncan Sands [Fri, 1 Mar 2013 09:46:03 +0000 (09:46 +0000)]
GCC thinks that this variable might be used uninitialized (it isn't).

llvm-svn: 176341

11 years ago[asan] Revert r176255, r176264.
Evgeniy Stepanov [Fri, 1 Mar 2013 09:33:05 +0000 (09:33 +0000)]
[asan] Revert r176255, r176264.

New allocator has 1.5x memory overhead of the old one.

llvm-svn: 176340

11 years agoPerform the receiver-expression transformations regardless of
John McCall [Fri, 1 Mar 2013 09:20:14 +0000 (09:20 +0000)]
Perform the receiver-expression transformations regardless of
whether we already have a method.  Fixes a bug where we were
failing to properly contextually convert a message receiver
during template instantiation.

As a side-effect, we now actually perform correct method lookup
after adjusting a message-send to integral or non-ObjC pointer
types (legal outside of ARC).

rdar://13305374

llvm-svn: 176339

11 years ago[sanitizer] Fix check failure in SizeClassMap::Print.
Evgeniy Stepanov [Fri, 1 Mar 2013 08:49:14 +0000 (08:49 +0000)]
[sanitizer] Fix check failure in SizeClassMap::Print.

llvm-svn: 176338

11 years agoDocs for llvm-symbolizer command-line tool
Alexey Samsonov [Fri, 1 Mar 2013 07:58:27 +0000 (07:58 +0000)]
Docs for llvm-symbolizer command-line tool

llvm-svn: 176337

11 years agoAttempt to not place ownership qualifiers on the result type
John McCall [Fri, 1 Mar 2013 07:58:16 +0000 (07:58 +0000)]
Attempt to not place ownership qualifiers on the result type
of block declarators.  Document the rule we use.

Also document the rule that Doug implemented a few weeks ago
which drops ownership qualifiers on function result types.

rdar://10127067

llvm-svn: 176336

11 years ago[analyzer] Reword FAQ
Anna Zaks [Fri, 1 Mar 2013 06:38:16 +0000 (06:38 +0000)]
[analyzer] Reword FAQ
Reword the FAQ to stress more that the assert should be used only in case
the developer is sure that the issue is a false positive.

llvm-svn: 176335

11 years agoMinor coding style fix
Michael Liao [Fri, 1 Mar 2013 04:19:34 +0000 (04:19 +0000)]
Minor coding style fix

llvm-svn: 176334

11 years agoAdd one more sanity check in SourceManager::getFileIDLoaded().
Argyrios Kyrtzidis [Fri, 1 Mar 2013 03:43:33 +0000 (03:43 +0000)]
Add one more sanity check in SourceManager::getFileIDLoaded().

llvm-svn: 176333

11 years ago[PCH] Enhance InputFile to also include whether the file is out-of-date.
Argyrios Kyrtzidis [Fri, 1 Mar 2013 03:26:04 +0000 (03:26 +0000)]
[PCH] Enhance InputFile to also include whether the file is out-of-date.

Previously we would return null for an out-of-date file. This inhibited ASTReader::ReadSLocEntry
from creating a FileID to recover gracefully in such a case.

llvm-svn: 176332

11 years agoIn SourceManager::getFileIDLoaded(), add some sanity checks to make sure we don't...
Argyrios Kyrtzidis [Fri, 1 Mar 2013 03:26:00 +0000 (03:26 +0000)]
In SourceManager::getFileIDLoaded(), add some sanity checks to make sure we don't enter an infinite loop.

rdar://13120919

llvm-svn: 176331

11 years ago[mips] Remove unused option. Fix 80-column violations.
Akira Hatanaka [Fri, 1 Mar 2013 02:17:02 +0000 (02:17 +0000)]
[mips] Remove unused option. Fix 80-column violations.

llvm-svn: 176330

11 years ago[mips] Add the capability to search delay slot filling instructions in
Akira Hatanaka [Fri, 1 Mar 2013 02:03:51 +0000 (02:03 +0000)]
[mips] Add the capability to search delay slot filling instructions in
successor basic blocks.

Currently this is off by default.

llvm-svn: 176329

11 years agoRestore order to placate test. I had no real reason to switch them.
John McCall [Fri, 1 Mar 2013 01:38:54 +0000 (01:38 +0000)]
Restore order to placate test.  I had no real reason to switch them.

llvm-svn: 176328

11 years agoRe-use bit from superclass and extract stuff into a local
John McCall [Fri, 1 Mar 2013 01:24:35 +0000 (01:24 +0000)]
Re-use bit from superclass and extract stuff into a local
function.  Serves a patch we're kicking around out-of-tree.

llvm-svn: 176327

11 years ago[mips] Do not add SecondLastInst to list BranchInstrs if there is only one
Akira Hatanaka [Fri, 1 Mar 2013 01:22:26 +0000 (01:22 +0000)]
[mips] Do not add SecondLastInst to list BranchInstrs if there is only one
terminator.

No functionality change.

llvm-svn: 176326

11 years ago[mips] Define an overloaded version of function MipsInstrInfo::AnalyzeBranchAdd.
Akira Hatanaka [Fri, 1 Mar 2013 01:10:17 +0000 (01:10 +0000)]
[mips] Define an overloaded version of function MipsInstrInfo::AnalyzeBranchAdd.

This function will be used later when the capability to search delay slot
filling instructions in successor blocks is added. No intended functionality
changes.

llvm-svn: 176325

11 years ago[Writer][ELF][x86-64] Handle GOTPCREL relocations to SharedLibraryAtoms.
Michael J. Spencer [Fri, 1 Mar 2013 01:09:46 +0000 (01:09 +0000)]
[Writer][ELF][x86-64] Handle GOTPCREL relocations to SharedLibraryAtoms.

llvm-svn: 176324

11 years ago[mips] Add options to disable searching backward and in successor blocks.
Akira Hatanaka [Fri, 1 Mar 2013 01:02:36 +0000 (01:02 +0000)]
[mips] Add options to disable searching backward and in successor blocks.

llvm-svn: 176321

11 years ago[mips] Add capability to search in the forward direction for instructions that
Akira Hatanaka [Fri, 1 Mar 2013 00:50:52 +0000 (00:50 +0000)]
[mips] Add capability to search in the forward direction for instructions that
can fill the delay slot.

Currently, this is off by default.

llvm-svn: 176320

11 years agoPatch from Andrew Fish to add recognition of some additional
Jason Molenda [Fri, 1 Mar 2013 00:43:19 +0000 (00:43 +0000)]
Patch from Andrew Fish to add recognition of some additional
KDP packets.

llvm-svn: 176319

11 years ago[mips] Define helper function searchRange
Akira Hatanaka [Fri, 1 Mar 2013 00:26:14 +0000 (00:26 +0000)]
[mips] Define helper function searchRange

No functionality change.

llvm-svn: 176318

11 years ago[mips] Rename function findDelayInstr to searchBackward.
Akira Hatanaka [Fri, 1 Mar 2013 00:20:16 +0000 (00:20 +0000)]
[mips] Rename function findDelayInstr to searchBackward.

llvm-svn: 176317

11 years agoScheduler diagnostics. Print the register name.
Andrew Trick [Fri, 1 Mar 2013 00:19:14 +0000 (00:19 +0000)]
Scheduler diagnostics. Print the register name.

llvm-svn: 176316

11 years agoFix incorrect ScheduleDAG comment and formalize Weak edges.
Andrew Trick [Fri, 1 Mar 2013 00:19:12 +0000 (00:19 +0000)]
Fix incorrect ScheduleDAG comment and formalize Weak edges.

llvm-svn: 176315

11 years agoInstructions schedulers should report correct height/depth.
Andrew Trick [Fri, 1 Mar 2013 00:19:09 +0000 (00:19 +0000)]
Instructions schedulers should report correct height/depth.

We avoided computing DAG height/depth during Node printing because it
shouldn't depend on an otherwise valid DAG. But this has become far
too annoying for the common case of a valid DAG where we want to see
valid values. If doing the computation on-the-fly turns out to be a
problem in practice, then I'll add a mode to the diagnostics to only
force it when we're likely to have a valid DAG, otherwise explicitly
print INVALID instead of bogus numbers. For now, just go for it all
the time.

llvm-svn: 176314

11 years ago[mips] Define class MemDefsUses.
Akira Hatanaka [Fri, 1 Mar 2013 00:16:31 +0000 (00:16 +0000)]
[mips] Define class MemDefsUses.

This class tracks dependence between memory instructions using underlying
objects of memory operands.

llvm-svn: 176313

11 years agoAdd the standard LLVM copyright notice to the top of
Jason Molenda [Fri, 1 Mar 2013 00:11:36 +0000 (00:11 +0000)]
Add the standard LLVM copyright notice to the top of
these two new files.

llvm-svn: 176312

11 years agoReport the kernel slide when attaching to a darwin kernel debug session.
Jason Molenda [Fri, 1 Mar 2013 00:06:37 +0000 (00:06 +0000)]
Report the kernel slide when attaching to a darwin kernel debug session.

llvm-svn: 176311

11 years ago[ELF][x86-64] Only emit a PLT entry for a PLT relocation if the target atom is a...
Michael J. Spencer [Fri, 1 Mar 2013 00:03:56 +0000 (00:03 +0000)]
[ELF][x86-64] Only emit a PLT entry for a PLT relocation if the target atom is a SharedLibraryAtom.

This seems to be what ld does, but I'm not sure how it works with symbol interposition.

With this hello-world with glibc dynamically linked works.

llvm-svn: 176310

11 years agoAdd basic linker script parsing.
Michael J. Spencer [Fri, 1 Mar 2013 00:03:36 +0000 (00:03 +0000)]
Add basic linker script parsing.

llvm-svn: 176309

11 years agoFix warning text of my last patch.
Fariborz Jahanian [Thu, 28 Feb 2013 23:16:39 +0000 (23:16 +0000)]
Fix warning text of my last patch.
// rdar://13158394

llvm-svn: 176308

11 years agoConnect LLVM CMake build scripts to LLDB's CMake scripts:
Daniel Malea [Thu, 28 Feb 2013 23:15:15 +0000 (23:15 +0000)]
Connect LLVM CMake build scripts to LLDB's CMake scripts:
- if you have LLDB checked out in $llvm/tools, CMake will build it now!
- LLDB is known to build on Linux with libstdc++ and GCC 4.6/4.7 or Clang 3.3
- to run lldb tests, do "make check-lldb" after a build

llvm-svn: 176307

11 years agoFinish up CMake support for LLDB (tested on Linux)
Daniel Malea [Thu, 28 Feb 2013 23:11:46 +0000 (23:11 +0000)]
Finish up CMake support for LLDB (tested on Linux)
- add missing scripts (driver, tests, etc...)
- enable running of tests from cmake with "make check-lldb" target
- fix up problem with clang dependencies (this enables parallel builds)
- implement platform-specific FIXMEs in source/CMakeLists.txt

llvm-svn: 176306

11 years agoA small refactoring + adding comments.
Eli Bendersky [Thu, 28 Feb 2013 23:09:18 +0000 (23:09 +0000)]
A small refactoring + adding comments.

SelectionDAGIsel::LowerArguments needs a function, not a basic block. So it
makes sense to pass it the function instead of extracting a basic-block from
the function and then tossing it. This is also more self-documenting (functions
have arguments, BBs don't).

In addition, added comments to a couple of Select* methods.

llvm-svn: 176305

11 years agoAdd more of the command line options as attribute flags.
Bill Wendling [Thu, 28 Feb 2013 22:49:57 +0000 (22:49 +0000)]
Add more of the command line options as attribute flags.

These can be easily queried by the back-end.

llvm-svn: 176304

11 years agoobjective-C: clang, following gcc, warns on
Fariborz Jahanian [Thu, 28 Feb 2013 22:36:31 +0000 (22:36 +0000)]
objective-C: clang, following gcc, warns on
use of stand-alone protocol as type and uses
id<proto>. Modify warning to say what compiler
is doing. // rdar//13158394

llvm-svn: 176303

11 years agoUse the Error parameter in ValueObject::ReadPointedString to actually report common...
Enrico Granata [Thu, 28 Feb 2013 22:01:33 +0000 (22:01 +0000)]
Use the Error parameter in ValueObject::ReadPointedString to actually report common errors

llvm-svn: 176302

11 years agoDon't add the 'Value' string if there isn't one.
Bill Wendling [Thu, 28 Feb 2013 21:17:03 +0000 (21:17 +0000)]
Don't add the 'Value' string if there isn't one.

This was causing the folding set to fail to fold attributes, because it was
being calculated in one spot without an empty values string but here with an
empty values string.

llvm-svn: 176301

11 years agoFix a bug in instcombine for fmul in fast math mode.
Quentin Colombet [Thu, 28 Feb 2013 21:12:40 +0000 (21:12 +0000)]
Fix a bug in instcombine for fmul in fast math mode.
The instcombine recognized pattern looks like:
a = b * c
d = a +/- Cst
or
a = b * c
d = Cst +/- a

When creating the new operands for fadd or fsub instruction following the related fmul, the first operand was created with the second original operand (M0 was created with C1) and the second with the first (M1 with Opnd0).

The fix consists in creating the new operands with the appropriate original operand, i.e., M0 with Opnd0 and M1 with C1.

llvm-svn: 176300

11 years ago[ELF][Hexagon] add quickdata relocations
Shankar Easwaran [Thu, 28 Feb 2013 20:54:03 +0000 (20:54 +0000)]
[ELF][Hexagon] add quickdata relocations

llvm-svn: 176298

11 years agoMove an assert earlier in a file and check that the result of
Eric Christopher [Thu, 28 Feb 2013 20:26:17 +0000 (20:26 +0000)]
Move an assert earlier in a file and check that the result of
our bitwise compare is equal to the field we're looking for.

Noticed on inspection.

llvm-svn: 176296

11 years agoDon't use 'exit' in lit script
Edwin Vane [Thu, 28 Feb 2013 20:11:25 +0000 (20:11 +0000)]
Don't use 'exit' in lit script

Some buildbots use a shell that doesn't know 'exit'. So instead of using XFAIL
for UseAuto/iterator.cpp (since this problem doesn't exist for cmake) leave the
'grep' command and turn off the others.

llvm-svn: 176295

11 years ago[ELF][x86-64] Separate static and dynamic GOT/PLT generation.
Michael J. Spencer [Thu, 28 Feb 2013 20:04:32 +0000 (20:04 +0000)]
[ELF][x86-64] Separate static and dynamic GOT/PLT generation.

llvm-svn: 176294

11 years agoTurning off UseAuto/iterator.cpp test until recursive make issue fixed
Edwin Vane [Thu, 28 Feb 2013 19:55:53 +0000 (19:55 +0000)]
Turning off UseAuto/iterator.cpp test until recursive make issue fixed

The way 'make check-all' causes configuration files to be generated results in
the cpp11-migrate/Makefile not being triggered to generated any files. These
files are necessary for UseAuto/iterator.cpp to run. Turning off this test
until the problem is fixed properly.

llvm-svn: 176293

11 years agoBrag about function call vectorization in the docs.
Benjamin Kramer [Thu, 28 Feb 2013 19:33:46 +0000 (19:33 +0000)]
Brag about function call vectorization in the docs.

llvm-svn: 176292

11 years agobreakpoint command add currently doesn't support adding commands to more than one...
Jim Ingham [Thu, 28 Feb 2013 19:30:07 +0000 (19:30 +0000)]
breakpoint command add currently doesn't support adding commands to more than one breakpoint
at a time.  Enforce this for now (we should relax the requirement when we have a little more time.)

<rdar://problem/13314462>

llvm-svn: 176291

11 years agoDon't add an attribute that already exists and don't remove an attribute that doesn...
Bill Wendling [Thu, 28 Feb 2013 19:17:40 +0000 (19:17 +0000)]
Don't add an attribute that already exists and don't remove an attribute that doesn't exist.

llvm-svn: 176289

11 years agoTidy up; no functional change.
Chad Rosier [Thu, 28 Feb 2013 19:16:42 +0000 (19:16 +0000)]
Tidy up; no functional change.

llvm-svn: 176288

11 years agoCost model support for lowered math builtins.
Benjamin Kramer [Thu, 28 Feb 2013 19:09:33 +0000 (19:09 +0000)]
Cost model support for lowered math builtins.

We make the cost for calling libm functions extremely high as emitting the
calls is expensive and causes spills (on x86) so performance suffers. We still
vectorize important calls like ceilf and friends on SSE4.1. and fabs.

Differential Revision: http://llvm-reviews.chandlerc.com/D466

llvm-svn: 176287

11 years agoUse the actual ABI-determined C calling convention for runtime
John McCall [Thu, 28 Feb 2013 19:01:20 +0000 (19:01 +0000)]
Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple.  This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention.  Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect.  However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility.  Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile;  so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

llvm-svn: 176286

11 years agoStyle; no functional change.
Chad Rosier [Thu, 28 Feb 2013 18:54:27 +0000 (18:54 +0000)]
Style; no functional change.

llvm-svn: 176285

11 years agoReplace all "-gdwarf-2" with "-g" to use the compiler defaults.
Greg Clayton [Thu, 28 Feb 2013 18:47:39 +0000 (18:47 +0000)]
Replace all "-gdwarf-2" with "-g" to use the compiler defaults.

llvm-svn: 176283

11 years agoFix the getCompilerVersion() function to do the right thing with clang 5.0 which...
Greg Clayton [Thu, 28 Feb 2013 18:46:31 +0000 (18:46 +0000)]
Fix the getCompilerVersion() function to do the right thing with clang 5.0 which now says "LLVM version" instead of "clang version".

llvm-svn: 176282

11 years agoFixed an issue where the LDFLAGS were not correctly gettting modified to be additive.
Greg Clayton [Thu, 28 Feb 2013 18:45:39 +0000 (18:45 +0000)]
Fixed an issue where the LDFLAGS were not correctly gettting modified to be additive.

llvm-svn: 176281

11 years ago[ELF][tests] changes for test cases
Shankar Easwaran [Thu, 28 Feb 2013 18:38:20 +0000 (18:38 +0000)]
[ELF][tests] changes for test cases

llvm-svn: 176280

11 years ago[ELF] Set header flags to 0 by default
Shankar Easwaran [Thu, 28 Feb 2013 18:36:34 +0000 (18:36 +0000)]
[ELF] Set header flags to 0 by default

llvm-svn: 176279

11 years ago[ELF][Hexagon] change Header flags
Shankar Easwaran [Thu, 28 Feb 2013 18:35:27 +0000 (18:35 +0000)]
[ELF][Hexagon] change Header flags

llvm-svn: 176278

11 years ago[lld][ELF][Hexagon] add more relocations
Shankar Easwaran [Thu, 28 Feb 2013 18:29:23 +0000 (18:29 +0000)]
[lld][ELF][Hexagon] add more relocations

llvm-svn: 176277

11 years agoClangFormat.rst: Fix two small typos
Hans Wennborg [Thu, 28 Feb 2013 18:16:24 +0000 (18:16 +0000)]
ClangFormat.rst: Fix two small typos

llvm-svn: 176276

11 years agoFix a problem where 'clang' is ambiguous in MSVC builds.
Manuel Klimek [Thu, 28 Feb 2013 18:12:44 +0000 (18:12 +0000)]
Fix a problem where 'clang' is ambiguous in MSVC builds.

llvm-svn: 176275

11 years agoMade lldb.cpp build with clang 5.0.
Greg Clayton [Thu, 28 Feb 2013 18:09:18 +0000 (18:09 +0000)]
Made lldb.cpp build with clang 5.0.

Also removed the use of llvm::raw_string_ostream as it wasn't needed.

Also fixed a crasher that could occur when the following line returned a C string tied to a local variable:

    return OS.str().c_str();

I am guessing "static std::string buf;" was supposed to get assigned to "OS.str()" and then have "buf.c_str()" returned.

Modified the non-apple version code to cache its value and not recompute the version every time.

llvm-svn: 176274

11 years agoPut some per-instruction statistics of fast isel under NDEBUG, together with
Eli Bendersky [Thu, 28 Feb 2013 18:05:12 +0000 (18:05 +0000)]
Put some per-instruction statistics of fast isel under NDEBUG, together with
other per-instruction statistics.

llvm-svn: 176273

11 years agoAdd comment to my last test.
Fariborz Jahanian [Thu, 28 Feb 2013 18:03:28 +0000 (18:03 +0000)]
Add comment to my last test.

llvm-svn: 176272

11 years agoobjective-C code completion. Property accessors may not
Fariborz Jahanian [Thu, 28 Feb 2013 17:47:14 +0000 (17:47 +0000)]
objective-C code completion. Property accessors may not
have their own code completion comments. Use those in
their properties in this case.
// rdar://12791315

llvm-svn: 176271

11 years agoRe-format comments (and check commit access)
Yiannis Tsiouris [Thu, 28 Feb 2013 16:59:10 +0000 (16:59 +0000)]
Re-format comments (and check commit access)

llvm-svn: 176270

11 years agoUpdate CMakeLists.txt as per removed file
Daniel Malea [Thu, 28 Feb 2013 16:53:22 +0000 (16:53 +0000)]
Update CMakeLists.txt as per removed file

llvm-svn: 176269

11 years agoRemove LLDB dependency on xcodeworkspace (on Linux) for version number
Daniel Malea [Thu, 28 Feb 2013 16:51:15 +0000 (16:51 +0000)]
Remove LLDB dependency on xcodeworkspace (on Linux) for version number
- make LLDB version number match Clang (and the Debian package)
- use the same revision detection magic that Clang uses to report SVN/Git revisions
- update test case as per above

Example output:

  $ lldb -v
  lldb version 3.3 (https://dmalea@llvm.org/svn/llvm-project/lldb/trunk revision 176211 clang revision 176208 llvm revision 176208)
ss

This line, and those below, will be ignored--

M    source/lldb.cpp
M    test/help/TestHelp.py
M    source/Makefile

llvm-svn: 176268

11 years agoAdd doxygen support for the tools in clang-tools-extra
Dmitri Gribenko [Thu, 28 Feb 2013 16:46:40 +0000 (16:46 +0000)]
Add doxygen support for the tools in clang-tools-extra

Patch by Ariel Bernal.

llvm-svn: 176267