platform/upstream/llvm.git
12 years agoRelease notes for MIPS backend.
Akira Hatanaka [Mon, 14 May 2012 18:40:07 +0000 (18:40 +0000)]
Release notes for MIPS backend.

llvm-svn: 156772

12 years agoTeach the driver on Linux to respect -nodefaultlibs.
Chandler Carruth [Mon, 14 May 2012 18:31:18 +0000 (18:31 +0000)]
Teach the driver on Linux to respect -nodefaultlibs.

Patch from Andrew C. Morrow.

llvm-svn: 156771

12 years agoRemove a stale forward declaration.
Andrew Trick [Mon, 14 May 2012 18:03:19 +0000 (18:03 +0000)]
Remove a stale forward declaration.

llvm-svn: 156770

12 years ago[analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.
Jordy Rose [Mon, 14 May 2012 17:58:35 +0000 (17:58 +0000)]
[analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.

We check the address of the last element accessed, but with 0 calculating that
address results in element -1. This patch bails out early (and avoids a bunch
of other work at that).

Fixes PR12807.

llvm-svn: 156769

12 years agoRemove the expensive BitVector::operator~().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:46:27 +0000 (15:46 +0000)]
Remove the expensive BitVector::operator~().

Returning a temporary BitVector is very expensive. If you must, create
the temporary explicitly: Use BitVector(A).flip() instead of ~A.

llvm-svn: 156768

12 years agoRemove BitVector binops.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:37:25 +0000 (15:37 +0000)]
Remove BitVector binops.

These operators were crazy slow, calling malloc to return a temporary
result. At the same time, they look very innocent when used in code.

If you need temporary BitVectors to compute your thing, create them
explicitly, and use the inplace logical operators. This makes the high
cost explicit in the code.

llvm-svn: 156767

12 years agotsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)
Dmitry Vyukov [Mon, 14 May 2012 15:33:00 +0000 (15:33 +0000)]
tsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)

llvm-svn: 156766

12 years agotsan: enabled report suppression for signal-unsafe reports
Dmitry Vyukov [Mon, 14 May 2012 15:28:03 +0000 (15:28 +0000)]
tsan: enabled report suppression for signal-unsafe reports

llvm-svn: 156765

12 years agotsan: fix output_tests script to actually verify tests results
Dmitry Vyukov [Mon, 14 May 2012 15:25:35 +0000 (15:25 +0000)]
tsan: fix output_tests script to actually verify tests results

llvm-svn: 156764

12 years agoConsider ad hoc aliasing when building RegUnits.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:20:39 +0000 (15:20 +0000)]
Consider ad hoc aliasing when building RegUnits.

Register units can be used to compute if two registers overlap:

  A overlaps B iff units(A) intersects units(B).

With this change, the above holds true even on targets that use ad hoc
aliasing (currently only ARM). This means that register units can be
used to implement regsOverlap() more efficiently, and the register
allocator can use the concept to model interference.

When there is no ad hoc aliasing, the register units correspond to the
maximal cliques in the register overlap graph. This is optimal, no other
register unit assignment can have fewer units.

With ad hoc aliasing, weird things are possible, and we don't try too
hard to compute the maximal cliques. The current approach is always
correct, and it works very well (probably optimally) as long as the ad
hoc aliasing doesn't have cliques larger than pairs. It seems unlikely
that any target would need more.

llvm-svn: 156763

12 years agoRecord the ad hoc aliasing graph in CodeGenRegister.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:12:37 +0000 (15:12 +0000)]
Record the ad hoc aliasing graph in CodeGenRegister.

The ad hoc aliasing specified in the 'Aliases' list in .td files is
currently only used by computeOverlaps(). It will soon be needed to
build accurate register units as well, so build the undirected graph in
CodeGenRegister::buildObjectGraph() instead.

Aliasing is a symmetric relationship with only one direction specified
in the .td files. Make sure both directions are represented in
getExplicitAliases().

llvm-svn: 156762

12 years agoCompute topological signatures of registers.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:10:07 +0000 (15:10 +0000)]
Compute topological signatures of registers.

TableGen creates new register classes and sub-register indices based on
the sub-register structure present in the register bank. So far, it has
been doing that on a per-register basis, but that is not very efficient.

This patch teaches TableGen to compute topological signatures for
registers, and use that to reduce the amount of redundant computation.
Registers get the same TopoSig if they have identical sub-register
structure.

TopoSigs are not currently exposed outside TableGen.

llvm-svn: 156761

12 years agoAdd BitVector::anyCommon().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:01:19 +0000 (15:01 +0000)]
Add BitVector::anyCommon().

The existing operation (A & B).any() is very slow.

llvm-svn: 156760

12 years agotsan: make addr2line symbolizer understand dynamic libraries
Dmitry Vyukov [Mon, 14 May 2012 14:38:29 +0000 (14:38 +0000)]
tsan: make addr2line symbolizer understand dynamic libraries
Collect info about all dynamic libraries in the process (name, base, size).
Determine to what dyn lib the address relates, route request to addr2line instance for the lib.

llvm-svn: 156759

12 years agotsan: update output tests to race on heap memory
Dmitry Vyukov [Mon, 14 May 2012 14:00:07 +0000 (14:00 +0000)]
tsan: update output tests to race on heap memory
Races on stack of main thread are problematic for COMPAT mapping, because it's not 1-to-1 and race addr is not properly mapped from shadow back to application memory.
Update output tests to race heap memory.

llvm-svn: 156758

12 years agoSwitchInst cosmetics: renamed "Hash" method to "hash"
Stepan Dyatkovskiy [Mon, 14 May 2012 08:26:31 +0000 (08:26 +0000)]
SwitchInst cosmetics: renamed "Hash" method to "hash"

llvm-svn: 156757

12 years agoFormatting changes. Remove the '...' placeholders.
Bill Wendling [Mon, 14 May 2012 08:11:53 +0000 (08:11 +0000)]
Formatting changes. Remove the '...' placeholders.

llvm-svn: 156756

12 years agoUse ArrayRef instead of an explicit vector type.
Bill Wendling [Mon, 14 May 2012 07:53:40 +0000 (07:53 +0000)]
Use ArrayRef instead of an explicit vector type.

llvm-svn: 156755

12 years agoAdd blurb about Julia.
Bill Wendling [Mon, 14 May 2012 06:23:51 +0000 (06:23 +0000)]
Add blurb about Julia.

llvm-svn: 156754

12 years ago[clang.py] Implement Cursor.canonical
Gregory Szorc [Mon, 14 May 2012 03:56:33 +0000 (03:56 +0000)]
[clang.py] Implement Cursor.canonical

llvm-svn: 156753

12 years ago[clang.py] Implement Cursor.result_type
Gregory Szorc [Mon, 14 May 2012 03:53:29 +0000 (03:53 +0000)]
[clang.py] Implement Cursor.result_type

llvm-svn: 156752

12 years agoTest for -fdebugger-objc-literal: missing methods should be generated like missing...
Jordy Rose [Sun, 13 May 2012 20:36:47 +0000 (20:36 +0000)]
Test for -fdebugger-objc-literal: missing methods should be generated like missing classes.

llvm-svn: 156746

12 years agoReleaseNotes: Add info on PTX back-end
Justin Holewinski [Sun, 13 May 2012 17:32:35 +0000 (17:32 +0000)]
ReleaseNotes: Add info on PTX back-end

llvm-svn: 156745

12 years agoHexagon: Initialize TBB to 0.
Benjamin Kramer [Sun, 13 May 2012 15:13:22 +0000 (15:13 +0000)]
Hexagon: Initialize TBB to 0.

Found by valgrind.

llvm-svn: 156744

12 years agoFix Xcode case (Upper X, lower c)
Jean-Daniel Dupas [Sun, 13 May 2012 14:36:15 +0000 (14:36 +0000)]
Fix Xcode case (Upper X, lower c)

llvm-svn: 156743

12 years agoFix Xcode case (Upper X, lower c)
Jean-Daniel Dupas [Sun, 13 May 2012 14:32:11 +0000 (14:32 +0000)]
Fix Xcode case (Upper X, lower c)

llvm-svn: 156742

12 years agotsan: fix mmap fd
Dmitry Vyukov [Sun, 13 May 2012 14:24:46 +0000 (14:24 +0000)]
tsan: fix mmap fd
This is mostly to test my commit access.
Fixes fd passed to mmap(), -1 is the proper invalid fd.

llvm-svn: 156741

12 years agoReleaseNotes: Add a note about zero_undef on llvm.cttz/ctlz. Extend x86 section....
Benjamin Kramer [Sun, 13 May 2012 13:10:35 +0000 (13:10 +0000)]
ReleaseNotes: Add a note about zero_undef on llvm.cttz/ctlz. Extend x86 section. Add a bullet for dwarf access tables.

llvm-svn: 156740

12 years agoReleaseNotes: Add a blurb about llvm-mc -g and move inliner changes into the optimize...
Benjamin Kramer [Sun, 13 May 2012 12:01:16 +0000 (12:01 +0000)]
ReleaseNotes: Add a blurb about llvm-mc -g and move inliner changes into the optimizer sections. Verbosify some bullets.

llvm-svn: 156739

12 years agoReleaseNotes: Document that LLVM was rewritten in python.
Benjamin Kramer [Sun, 13 May 2012 11:46:05 +0000 (11:46 +0000)]
ReleaseNotes: Document that LLVM was rewritten in python.

                            ^~~~
                            llvm-build

llvm-svn: 156738

12 years agoReleaseNotes: Add bullets for removed targets. Extend the note about llvm-ld removal.
Benjamin Kramer [Sun, 13 May 2012 11:28:46 +0000 (11:28 +0000)]
ReleaseNotes: Add bullets for removed targets. Extend the note about llvm-ld removal.

llvm-svn: 156737

12 years agoOutline some clang 3.1 highlights off the top of my head.
Benjamin Kramer [Sun, 13 May 2012 10:40:08 +0000 (10:40 +0000)]
Outline some clang 3.1 highlights off the top of my head.

llvm-svn: 156736

12 years agoAdd a link for every project.
Benjamin Kramer [Sun, 13 May 2012 10:21:51 +0000 (10:21 +0000)]
Add a link for every project.

llvm-svn: 156735

12 years agoAdd blurb for LLVM D Compiler.
Bill Wendling [Sun, 13 May 2012 10:00:58 +0000 (10:00 +0000)]
Add blurb for LLVM D Compiler.

llvm-svn: 156733

12 years agoAdd blurbs for pocl and TCE.
Bill Wendling [Sun, 13 May 2012 09:59:27 +0000 (09:59 +0000)]
Add blurbs for pocl and TCE.

llvm-svn: 156732

12 years agoAdd OSL blurb.
Bill Wendling [Sun, 13 May 2012 09:55:24 +0000 (09:55 +0000)]
Add OSL blurb.

llvm-svn: 156731

12 years agoAdd FAUST blurb.
Bill Wendling [Sun, 13 May 2012 09:52:48 +0000 (09:52 +0000)]
Add FAUST blurb.

llvm-svn: 156730

12 years agoFix the tool documentation
Nadav Rotem [Sun, 13 May 2012 05:52:56 +0000 (05:52 +0000)]
Fix the tool documentation

llvm-svn: 156729

12 years agoRefactor all the
Rafael Espindola [Sun, 13 May 2012 03:25:18 +0000 (03:25 +0000)]
Refactor all the

  if (Inherited)
    Attr->setInherited(true);

To a central location.

llvm-svn: 156728

12 years agoProduce a warning for mismatched section attributes. Completest pr9356.
Rafael Espindola [Sun, 13 May 2012 02:42:42 +0000 (02:42 +0000)]
Produce a warning for mismatched section attributes. Completest pr9356.

llvm-svn: 156727

12 years agoWe were already passing the case in pr9356. Add it to attributes.c to make
Rafael Espindola [Sun, 13 May 2012 01:56:10 +0000 (01:56 +0000)]
We were already passing the case in pr9356. Add it to attributes.c to make
sure we don't regress. I will add a warning in a sec.

llvm-svn: 156726

12 years agoDocument Python bindings in release notes
Gregory Szorc [Sat, 12 May 2012 21:12:22 +0000 (21:12 +0000)]
Document Python bindings in release notes

llvm-svn: 156724

12 years agoAdd support for __attribute__((hot)) and __attribute__((cold)).
Benjamin Kramer [Sat, 12 May 2012 21:10:52 +0000 (21:10 +0000)]
Add support for __attribute__((hot)) and __attribute__((cold)).

Currently cold functions are marked with the "optsize" attribute in CodeGen
so they are always optimized for size.  The hot attribute is just ignored,
LLVM doesn't have a way to express hotness at the moment.

llvm-svn: 156723

12 years ago[clang.py] Followup to TranslationUnit refactor
Gregory Szorc [Sat, 12 May 2012 20:49:13 +0000 (20:49 +0000)]
[clang.py] Followup to TranslationUnit refactor

* Document index argument in TranslationUnit.from_source
* Add numeric error code to TranslationUnitSaveError string representation
* Use None instead of [] for default argument value in
  TranslationUnit.codeComplete

llvm-svn: 156722

12 years agoAdd Python binding info to release notes
Gregory Szorc [Sat, 12 May 2012 20:45:56 +0000 (20:45 +0000)]
Add Python binding info to release notes

llvm-svn: 156721

12 years ago[analyzer] Test case: p->x is the same as p[0].x. (PR7297)
Jordy Rose [Sat, 12 May 2012 17:32:59 +0000 (17:32 +0000)]
[analyzer] Test case: p->x is the same as p[0].x. (PR7297)

llvm-svn: 156720

12 years agoOnly check NSArray/NSDictionary boxing method params once.
Jordy Rose [Sat, 12 May 2012 17:32:56 +0000 (17:32 +0000)]
Only check NSArray/NSDictionary boxing method params once.

Once we've found a "good" method, we don't need to check its argument types
again. (Even if we might have later found a "bad" method, we were already
caching the method we first looked up.)

llvm-svn: 156719

12 years ago80-col violations and minor reformatting. No functionality change.
Jordy Rose [Sat, 12 May 2012 17:32:52 +0000 (17:32 +0000)]
80-col violations and minor reformatting. No functionality change.

llvm-svn: 156718

12 years agoClean up ObjC boxing method checks by reducing duplicated code.
Jordy Rose [Sat, 12 May 2012 17:32:44 +0000 (17:32 +0000)]
Clean up ObjC boxing method checks by reducing duplicated code.

llvm-svn: 156717

12 years agoFix spacing after if.
Benjamin Kramer [Sat, 12 May 2012 16:52:21 +0000 (16:52 +0000)]
Fix spacing after if.

llvm-svn: 156716

12 years agoRemove unused variable. Thanks to Dmitri Gribenko for noticing it.
Rafael Espindola [Sat, 12 May 2012 16:35:00 +0000 (16:35 +0000)]
Remove unused variable. Thanks to Dmitri Gribenko for noticing it.

llvm-svn: 156715

12 years agoAdd support for the .rept directive. Patch by Vladmir Sorokin. I added support
Rafael Espindola [Sat, 12 May 2012 16:31:10 +0000 (16:31 +0000)]
Add support for the .rept directive. Patch by Vladmir Sorokin. I added support
for nesting.

llvm-svn: 156714

12 years agoDon't crash on boxed strings when +stringWithUTF8String: is missing.
Jordy Rose [Sat, 12 May 2012 15:53:41 +0000 (15:53 +0000)]
Don't crash on boxed strings when +stringWithUTF8String: is missing.

Also, unify some diagnostics for boxed expressions that have the same form.

Fixes PR12804.

llvm-svn: 156713

12 years agoELF: Add support for the asm .version directive.
Benjamin Kramer [Sat, 12 May 2012 14:30:47 +0000 (14:30 +0000)]
ELF: Add support for the asm .version directive.

llvm-svn: 156712

12 years agoIncrease error_message_buffer_size to 64K (16K is insufficient for large programs)
Alexander Potapenko [Sat, 12 May 2012 12:33:41 +0000 (12:33 +0000)]
Increase error_message_buffer_size to 64K (16K is insufficient for large programs)

llvm-svn: 156711

12 years agoFix GetFrameNameByAddr hitting stale stack guards.
Evgeniy Stepanov [Sat, 12 May 2012 12:33:10 +0000 (12:33 +0000)]
Fix GetFrameNameByAddr hitting stale stack guards.

In the current implementation AsanThread::GetFrameNameByAddr scans the
stack for a magic guard value to locate base address of the stack
frame. This is not reliable, especially on ARM, where the code that
stores this magic value has to construct it in a register from two
small intermediates; this register can then end up stored in a random
stack location in the prologue of another function.

With this change, GetFrameNameByAddr scans the shadow memory for the
signature of a left stack redzone instead. It is now possible to
remove the magic from the instrumentation pass for additional
performance gain. We keep it there for now just to make sure the new
algorithm does not fail in some corner case.

llvm-svn: 156710

12 years agoAsmParser: Add support for the .purgem directive.
Benjamin Kramer [Sat, 12 May 2012 11:21:46 +0000 (11:21 +0000)]
AsmParser: Add support for the .purgem directive.

Based on a patch by Team PaX.

llvm-svn: 156709

12 years agoAsmParser: Give a nice error message for .code16gcc, which is currently unsupported.
Benjamin Kramer [Sat, 12 May 2012 11:19:04 +0000 (11:19 +0000)]
AsmParser: Give a nice error message for .code16gcc, which is currently unsupported.

Patch by Team PaX!

llvm-svn: 156708

12 years agoAsmParser: ignore the .extern directive.
Benjamin Kramer [Sat, 12 May 2012 11:18:59 +0000 (11:18 +0000)]
AsmParser: ignore the .extern directive.

llvm-svn: 156707

12 years agoAsmParser: Add support for .ifc and .ifnc directives.
Benjamin Kramer [Sat, 12 May 2012 11:18:51 +0000 (11:18 +0000)]
AsmParser: Add support for .ifc and .ifnc directives.

Based on a patch from PaX Team.

llvm-svn: 156706

12 years agoAsmParser: Add support for .ifb and .ifnb directives.
Benjamin Kramer [Sat, 12 May 2012 11:18:42 +0000 (11:18 +0000)]
AsmParser: Add support for .ifb and .ifnb directives.

Based on a patch from PaX Team.

llvm-svn: 156705

12 years agoRecommited r156374 with critical fixes in BitcodeReader/Writer:
Stepan Dyatkovskiy [Sat, 12 May 2012 10:48:17 +0000 (10:48 +0000)]
Recommited r156374 with critical fixes in BitcodeReader/Writer:
Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.

llvm-svn: 156704

12 years agoTeach Function::hasAddressTaken that BlockAddress doesn't really take
Jay Foad [Sat, 12 May 2012 08:30:16 +0000 (08:30 +0000)]
Teach Function::hasAddressTaken that BlockAddress doesn't really take
the address of a function.

llvm-svn: 156703

12 years agoMake sure new value jump is enabled for Hexagon V5 as well.
Sirish Pande [Sat, 12 May 2012 05:54:15 +0000 (05:54 +0000)]
Make sure new value jump is enabled for Hexagon V5 as well.

llvm-svn: 156700

12 years ago[analyzer] RetainCountChecker: track ObjC boxed expression objects.
Jordy Rose [Sat, 12 May 2012 05:10:43 +0000 (05:10 +0000)]
[analyzer] RetainCountChecker: track ObjC boxed expression objects.

llvm-svn: 156699

12 years agoSupport for Hexagon feature, New Value Jump.
Sirish Pande [Sat, 12 May 2012 05:10:30 +0000 (05:10 +0000)]
Support for Hexagon feature, New Value Jump.

llvm-svn: 156698

12 years agoFix test cases.
Akira Hatanaka [Sat, 12 May 2012 03:25:16 +0000 (03:25 +0000)]
Fix test cases.

llvm-svn: 156697

12 years agoRemove MipsEmitGPRestore.cpp.
Akira Hatanaka [Sat, 12 May 2012 03:24:03 +0000 (03:24 +0000)]
Remove MipsEmitGPRestore.cpp.

llvm-svn: 156696

12 years agoDelete all functions that are no longer needed in MipsFunctionInfo, including
Akira Hatanaka [Sat, 12 May 2012 03:22:13 +0000 (03:22 +0000)]
Delete all functions that are no longer needed in MipsFunctionInfo, including
the ones that get or set the frame index for the $gp save slot.

Remove the piece of code in MipsFunctionInfo::getGlobalBaseReg() which returns
GP. This function should always return a virtual register.

llvm-svn: 156695

12 years agoStop reserving register $gp. Do not call isGPFI to check whether a frame object
Akira Hatanaka [Sat, 12 May 2012 03:21:18 +0000 (03:21 +0000)]
Stop reserving register $gp. Do not call isGPFI to check whether a frame object
is the $gp save slot.

llvm-svn: 156694

12 years agoDo not add the pass which restores $gp after every function call.
Akira Hatanaka [Sat, 12 May 2012 03:19:51 +0000 (03:19 +0000)]
Do not add the pass which restores $gp after every function call.

llvm-svn: 156693

12 years agoMake the following changes in MipsISelLowering.cpp:
Akira Hatanaka [Sat, 12 May 2012 03:19:04 +0000 (03:19 +0000)]
Make the following changes in MipsISelLowering.cpp:

- Stop creating stack frame objects needed for saving $gp.
- Insert a node that copies the global pointer register to register $gp
  before the call node. This will ensure $gp is valid at the entry of the
  called function.

llvm-svn: 156692

12 years agoMake the following changes in MipsFrameLowering.cpp:
Akira Hatanaka [Sat, 12 May 2012 03:18:00 +0000 (03:18 +0000)]
Make the following changes in MipsFrameLowering.cpp:

- Stop emitting instructions needed to initialize the global pointer register.
- Stop emitting .cprestore directive.
- Do not take into account the $gp save slot when computing stack size.

llvm-svn: 156691

12 years agoSpeed up computeComposites() by using the new SubReg -> SubIdx map.
Jakob Stoklund Olesen [Sat, 12 May 2012 02:02:26 +0000 (02:02 +0000)]
Speed up computeComposites() by using the new SubReg -> SubIdx map.

TableGen doesn't need to search through the SubRegs map to find an
inverse entry.

llvm-svn: 156690

12 years agoMake the following changes in MipsAsmPrinter.cpp:
Akira Hatanaka [Sat, 12 May 2012 00:48:43 +0000 (00:48 +0000)]
Make the following changes in MipsAsmPrinter.cpp:

- Remove code which lowers pseudo SETGP01.
- Fix LowerSETGP01. The first two of the three instructions that are emitted to
  initialize the global pointer register now use register $2.
- Stop emitting .cpload directive.

llvm-svn: 156689

12 years agoHoist simpler checks above llvm::PointerMayBeCaptured. No functional change intended.
Chad Rosier [Sat, 12 May 2012 00:43:40 +0000 (00:43 +0000)]
Hoist simpler checks above llvm::PointerMayBeCaptured. No functional change intended.

llvm-svn: 156687

12 years agoAdd a useful error message to "log enable" with the wrong number of arguments, and...
Jim Ingham [Sat, 12 May 2012 00:38:30 +0000 (00:38 +0000)]
Add a useful error message to "log enable" with the wrong number of arguments, and reject "log enable lldb" which just silently did nothing before.

llvm-svn: 156686

12 years agoDon't look for empty live ranges in the unions.
Jakob Stoklund Olesen [Sat, 12 May 2012 00:33:28 +0000 (00:33 +0000)]
Don't look for empty live ranges in the unions.

Empty live ranges represent undef and still get allocated, but they
won't appear in LiveIntervalUnions.

Patch by Patrik Hägglund!

llvm-svn: 156685

12 years ago<rdar://problem/11439169>
Greg Clayton [Sat, 12 May 2012 00:26:42 +0000 (00:26 +0000)]
<rdar://problem/11439169>

"lldb -a i386" doesn't set the calculator mode correctly if run on a 64 bit system.

The previous logic always used the current host architecture, not the default architecture. The default arch gets set into a static varaible in lldb_private::Target when an arch is set from the command line:

lldb -a i386

We now use the default arch correctly.

llvm-svn: 156680

12 years agoInsert instructions to the entry basic block which initializes the global
Akira Hatanaka [Sat, 12 May 2012 00:17:17 +0000 (00:17 +0000)]
Insert instructions to the entry basic block which initializes the global
pointer register.

This is the first of the series of patches which clean up the way global pointer
register is used. The patches will make the following improvements:

- Make $gp an allocatable temporary register rather than reserving it.
- Use a virtual register as the global pointer register and let the register
  allocator decide which register to assign to it or whether spill/reloads are
  needed.
- Make sure $gp is valid at the entry of a called function, which is necessary
  for functions using lazy binding.
- Remove the need for emitting .cprestore and .cpload directives.

llvm-svn: 156671

12 years ago<rdar://problem/11439022>
Greg Clayton [Sat, 12 May 2012 00:01:21 +0000 (00:01 +0000)]
<rdar://problem/11439022>

Restore expressions with no target.

llvm-svn: 156669

12 years agoFix a comment I had incorrectly altered.
Jim Ingham [Fri, 11 May 2012 23:49:49 +0000 (23:49 +0000)]
Fix a comment I had incorrectly altered.

llvm-svn: 156668

12 years agoFound one more place where the OkayToDiscard needs to be consulted.
Jim Ingham [Fri, 11 May 2012 23:47:32 +0000 (23:47 +0000)]
Found one more place where the OkayToDiscard needs to be consulted.
Also changed the defaults for SBThread::Step* to not delete extant plans.
Also added some test cases to test more complex stepping scenarios.

llvm-svn: 156667

12 years agoTeach the parser to deal with multiple spellings for the same
Douglas Gregor [Fri, 11 May 2012 23:37:49 +0000 (23:37 +0000)]
Teach the parser to deal with multiple spellings for the same
attribute, rather than requiring multiple cases in consumers of this
information.

llvm-svn: 156666

12 years agoAdd doxygen comments.
Michael J. Spencer [Fri, 11 May 2012 23:34:39 +0000 (23:34 +0000)]
Add doxygen comments.

llvm-svn: 156665

12 years ago[analyzer] Test variable modified types.
Anna Zaks [Fri, 11 May 2012 23:34:14 +0000 (23:34 +0000)]
[analyzer] Test variable modified types.

llvm-svn: 156664

12 years agoDo not replace operands of pseudo instructions with register $zero.
Akira Hatanaka [Fri, 11 May 2012 23:22:18 +0000 (23:22 +0000)]
Do not replace operands of pseudo instructions with register $zero.

llvm-svn: 156663

12 years agoRevert 156658.
Chad Rosier [Fri, 11 May 2012 23:21:01 +0000 (23:21 +0000)]
Revert 156658.

llvm-svn: 156662

12 years ago[analyzer] Do not walk the types for call graph construction.
Anna Zaks [Fri, 11 May 2012 23:15:18 +0000 (23:15 +0000)]
[analyzer] Do not walk the types for call graph construction.

llvm-svn: 156661

12 years ago[analyzer] Test objC boxing.
Anna Zaks [Fri, 11 May 2012 23:15:16 +0000 (23:15 +0000)]
[analyzer] Test objC boxing.

llvm-svn: 156660

12 years ago[analyzer] Add buffer overflow test case.
Anna Zaks [Fri, 11 May 2012 23:15:11 +0000 (23:15 +0000)]
[analyzer] Add buffer overflow test case.

llvm-svn: 156659

12 years ago[fast-isel] Fast-isel doesn't use the expect intrinsic.
Chad Rosier [Fri, 11 May 2012 23:10:58 +0000 (23:10 +0000)]
[fast-isel] Fast-isel doesn't use the expect intrinsic.

llvm-svn: 156658

12 years agoMake sure that we recognize __attribute__((align)) as a synonym for
Douglas Gregor [Fri, 11 May 2012 23:01:43 +0000 (23:01 +0000)]
Make sure that we recognize __attribute__((align)) as a synonym for
__attribute__((aligned)). Fixes <rdar://problem/11435441>, a
regression I introduced in r156003. This is the narrow fix; a more
comprehensive fix is coming.

llvm-svn: 156657

12 years agoUse regular expression to match register names.
Akira Hatanaka [Fri, 11 May 2012 23:00:40 +0000 (23:00 +0000)]
Use regular expression to match register names.

llvm-svn: 156656

12 years agoMake the URL a link instead.
Bill Wendling [Fri, 11 May 2012 22:38:33 +0000 (22:38 +0000)]
Make the URL a link instead.

llvm-svn: 156655

12 years agoWhen diagnosing inaccessible temporary destructors in decltype expressions, use
Richard Smith [Fri, 11 May 2012 22:20:10 +0000 (22:20 +0000)]
When diagnosing inaccessible temporary destructors in decltype expressions, use
the correct type and the correct source location in the diagnostic. Spotted by
Johannes Schaub!

llvm-svn: 156654

12 years agoMerge branch 'format-string-braced-init'
Matt Beaumont-Gay [Fri, 11 May 2012 22:10:59 +0000 (22:10 +0000)]
Merge branch 'format-string-braced-init'

llvm-svn: 156653

12 years ago[Support/StringRef] Add find_last_not_of and {r,l,}trim.
Michael J. Spencer [Fri, 11 May 2012 22:08:50 +0000 (22:08 +0000)]
[Support/StringRef] Add find_last_not_of and {r,l,}trim.

llvm-svn: 156652

12 years agoRemove comments and an extra print statement.
Greg Clayton [Fri, 11 May 2012 21:57:50 +0000 (21:57 +0000)]
Remove comments and an extra print statement.

llvm-svn: 156651

12 years agoCoerce byval aggregate arguments to integers whose size matches the integer
Akira Hatanaka [Fri, 11 May 2012 21:56:58 +0000 (21:56 +0000)]
Coerce byval aggregate arguments to integers whose size matches the integer
register size of the target architecture.

llvm-svn: 156650