platform/upstream/llvm.git
11 years agoFix missing source location in CXXTemporaryObjectExpr nodes.
Enea Zaffanella [Sat, 7 Sep 2013 05:49:53 +0000 (05:49 +0000)]
Fix missing source location in CXXTemporaryObjectExpr nodes.
For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange
in CXXConstructExpr nodes.
Added testcase.

llvm-svn: 190239

11 years agoAdded some MSVC required functions in Windows.cpp. Moved MSVC specific getopt code...
Virgile Bello [Sat, 7 Sep 2013 05:05:49 +0000 (05:05 +0000)]
Added some MSVC required functions in Windows.cpp. Moved MSVC specific getopt code inside its own folder.

llvm-svn: 190238

11 years agoScopInfo: Correctly handle true/false conditions
Tobias Grosser [Sat, 7 Sep 2013 01:54:13 +0000 (01:54 +0000)]
ScopInfo: Correctly handle true/false conditions

This is a modified version of the orignally contributed patch.

Contributed-by: alexandre.isoard@gmail.com
llvm-svn: 190237

11 years ago[mips] Fix typos.
Akira Hatanaka [Sat, 7 Sep 2013 01:14:42 +0000 (01:14 +0000)]
[mips] Fix typos.

llvm-svn: 190236

11 years ago[mips] Enhance command line option "-mno-ldc1-sdc1" to expand base+index double
Akira Hatanaka [Sat, 7 Sep 2013 00:52:30 +0000 (00:52 +0000)]
[mips] Enhance command line option "-mno-ldc1-sdc1" to expand base+index double
precision loads and stores as well as reg+imm double precision loads and stores.

Previously, expansion of loads and stores was done after register allocation,
but now it takes place during legalization. As a result, users will see double
precision stores and loads being emitted to spill and restore 64-bit FP registers.

llvm-svn: 190235

11 years ago[mips] Place parentheses around && to silence warning.
Akira Hatanaka [Sat, 7 Sep 2013 00:26:26 +0000 (00:26 +0000)]
[mips] Place parentheses around && to silence warning.

llvm-svn: 190234

11 years agoRemove verifier check that attribute 'builtin' is only applied to calls to
Richard Smith [Sat, 7 Sep 2013 00:25:48 +0000 (00:25 +0000)]
Remove verifier check that attribute 'builtin' is only applied to calls to
functions marked 'nobuiltin'. That approach doesn't play well with LTO, and
there's no harm in marking a call as 'builtin' if it was going to be a builtin
regardless.

llvm-svn: 190233

11 years ago[mips] Add definition of instruction "drotr32" (double rotate right plus 32).
Akira Hatanaka [Sat, 7 Sep 2013 00:18:01 +0000 (00:18 +0000)]
[mips] Add definition of instruction "drotr32" (double rotate right plus 32).

llvm-svn: 190232

11 years agoDebug Info: Use identifier to reference DIType in containing type field of
Manman Ren [Sat, 7 Sep 2013 00:04:05 +0000 (00:04 +0000)]
Debug Info: Use identifier to reference DIType in containing type field of
a DISubprogram.

Verifier is updated accordingly.

llvm-svn: 190229

11 years ago[mips] Use uimm5 and uimm6 instead of shamt and imm, if the immediate has to fit
Akira Hatanaka [Sat, 7 Sep 2013 00:02:02 +0000 (00:02 +0000)]
[mips] Use uimm5 and uimm6 instead of shamt and imm, if the immediate has to fit
into a 5-bit or 6-bit field.

llvm-svn: 190226

11 years agoDebug Info: pass in VTableHolder as DIType instead of MDNode *.
Manman Ren [Fri, 6 Sep 2013 23:54:23 +0000 (23:54 +0000)]
Debug Info: pass in VTableHolder as DIType instead of MDNode *.

Remove one cast and improve readability. No functionality change.

llvm-svn: 190225

11 years ago[mips] Define "trap" as a pseudo instruction that turns into "break 0, 0".
Akira Hatanaka [Fri, 6 Sep 2013 23:52:46 +0000 (23:52 +0000)]
[mips] Define "trap" as a pseudo instruction that turns into "break 0, 0".

llvm-svn: 190224

11 years agoObjectiveC migrator: When inferring a property,
Fariborz Jahanian [Fri, 6 Sep 2013 23:45:20 +0000 (23:45 +0000)]
ObjectiveC migrator: When inferring a property,
preserve getter's attribute. Also, do not attach
an inferred NS_RETURNS_INNER_POINTER to the inferred
property (it is illegal).

llvm-svn: 190223

11 years agoReorder libm LIBBUILTIN definition groups
Hal Finkel [Fri, 6 Sep 2013 23:45:10 +0000 (23:45 +0000)]
Reorder libm LIBBUILTIN definition groups

The groups of libm LIBBUILTIN definitions are reordered to match the order of
the corresponding __builtin_* definitions (which occur earlier in the
Builtins.def file).

No functionality change intended.

llvm-svn: 190222

11 years ago[mips] Delete unused classes and defs.
Akira Hatanaka [Fri, 6 Sep 2013 23:42:58 +0000 (23:42 +0000)]
[mips] Delete unused classes and defs.

llvm-svn: 190221

11 years ago[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
Akira Hatanaka [Fri, 6 Sep 2013 23:40:15 +0000 (23:40 +0000)]
[mips] Make "b" (unconditional branch) a pseudo. "b" is an assembly idiom, which is
equivalent to "beq $zero, $zero, offset".

llvm-svn: 190220

11 years ago[mips] Set instruction itineraries of loads, stores and conditional moves.
Akira Hatanaka [Fri, 6 Sep 2013 23:28:24 +0000 (23:28 +0000)]
[mips] Set instruction itineraries of loads, stores and conditional moves.

llvm-svn: 190219

11 years agoReorder libm LIBBUILTIN definitions
Hal Finkel [Fri, 6 Sep 2013 23:23:53 +0000 (23:23 +0000)]
Reorder libm LIBBUILTIN definitions

The libm LIBBUILTIN definitions are reordered to the canonical (and
alphabetical) double (''), float ('f'), long double ('l') ordering.

No functionality change intended.

llvm-svn: 190218

11 years agoAdd the missing "n" to libm LIBBUILTIN definitions
Hal Finkel [Fri, 6 Sep 2013 23:23:32 +0000 (23:23 +0000)]
Add the missing "n" to libm LIBBUILTIN definitions

The libm math functions should be marked with the "n" (nothrow) flag so that
the corresponding IR function declarations are tagged with the nounwind
attribute (this has been true in C mode, but not in C++ mode).

The test case has been updated to run in C++ mode in addition to in C mode.

llvm-svn: 190217

11 years agoTBAA: add isTBAAVtableAccess to MDNode so clients can call the function
Manman Ren [Fri, 6 Sep 2013 22:47:05 +0000 (22:47 +0000)]
TBAA: add isTBAAVtableAccess to MDNode so clients can call the function
instead of having its own implementation.

The implementation of isTBAAVtableAccess is in TypeBasedAliasAnalysis.cpp
since it is related to the format of TBAA metadata.

The path for struct-path tbaa will be exercised by
test/Instrumentation/ThreadSanitizer/read_from_global.ll, vptr_read.ll, and
vptr_update.ll when struct-path tbaa is on by default.

llvm-svn: 190216

11 years agoUse a more backwards-compatible method for evaluating expressions and add
Adrian Prantl [Fri, 6 Sep 2013 22:33:52 +0000 (22:33 +0000)]
Use a more backwards-compatible method for evaluating expressions and add
more explanatory error messages.

llvm-svn: 190215

11 years agoRe-enable some locally passing tests on Linux and see how they behave on the buildbots.
Matt Kopec [Fri, 6 Sep 2013 22:33:49 +0000 (22:33 +0000)]
Re-enable some locally passing tests on Linux and see how they behave on the buildbots.

llvm-svn: 190214

11 years agoRemove error-prone 'list initialization' flag from an implicit conversion
Richard Smith [Fri, 6 Sep 2013 22:30:28 +0000 (22:30 +0000)]
Remove error-prone 'list initialization' flag from an implicit conversion
sequence. All that matters here is whether we're doing the
std::initializer_list special case thing.

llvm-svn: 190213

11 years agoclang-modernize: Fix bugs in Pass-By-Value transform
Guillaume Papin [Fri, 6 Sep 2013 22:28:53 +0000 (22:28 +0000)]
clang-modernize: Fix bugs in Pass-By-Value transform

- Limit the transform to const-ref and non-const value parameters only.
- Do not generate a replacement when the type is already a value.

See CM-139 for the bugs corresponding to this issue.

llvm-svn: 190212

11 years agoImplement mad_hi built-in
Aaron Watry [Fri, 6 Sep 2013 22:09:51 +0000 (22:09 +0000)]
Implement mad_hi built-in

We already have a working mul_hi, and the spec gives us the implementation as:
Returns mul_hi(a,b)+c.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190211

11 years ago[PECOFF] Don't add RVAs to base relocations table.
Rui Ueyama [Fri, 6 Sep 2013 22:09:02 +0000 (22:09 +0000)]
[PECOFF] Don't add RVAs to base relocations table.

Patch by Ron Ofir.

llvm-svn: 190210

11 years agoclang-format: Fix regression introduced by r190038.
Daniel Jasper [Fri, 6 Sep 2013 21:46:41 +0000 (21:46 +0000)]
clang-format: Fix regression introduced by r190038.

Before:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) {
                                 }
After:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaa(a), bbbbbbbbbbbbbbbbbbbbbbbb(b) {
  }

llvm-svn: 190209

11 years agoclang-format: Format typed enums with nested names.
Daniel Jasper [Fri, 6 Sep 2013 21:32:35 +0000 (21:32 +0000)]
clang-format: Format typed enums with nested names.

The explicit type specified for an enum can actually have a nested name
specifier.

This fixes llvm.org/PR17125.

llvm-svn: 190208

11 years agoclang-format: Don't confuse operator[] with lambdas.
Daniel Jasper [Fri, 6 Sep 2013 21:25:51 +0000 (21:25 +0000)]
clang-format: Don't confuse operator[] with lambdas.

Before:
  double &operator[](int i) { return 0; } int i;

After:
  double &operator[](int i) { return 0; }
  int i;

This fixes llvm.org/PR17134.

llvm-svn: 190207

11 years agoPreserve exception specs in function decl merging.
Eli Friedman [Fri, 6 Sep 2013 21:09:09 +0000 (21:09 +0000)]
Preserve exception specs in function decl merging.

Exception specs are not part of the canonical type, but we shouldn't
drop them just because we merged a noreturn attribute.

Fixes PR17110.

llvm-svn: 190206

11 years agoDebug Info Testing: updated to use NULL instead of "i32 0" in a few fields.
Manman Ren [Fri, 6 Sep 2013 21:03:58 +0000 (21:03 +0000)]
Debug Info Testing: updated to use NULL instead of "i32 0" in a few fields.

Field 2 of DIType (Context), field 9 of DIDerivedType (TypeDerivedFrom),
field 12 of DICompositeType (ContainingType), fields 2, 7, 12 of DISubprogram
(Context, Type, ContainingType).

llvm-svn: 190205

11 years agoUnbreak the Clang -Werror build after r190183.
David Blaikie [Fri, 6 Sep 2013 20:58:25 +0000 (20:58 +0000)]
Unbreak the Clang -Werror build after r190183.

Best guess at the right answer here - no guarantees of fitness for any
particular purpose.

llvm-svn: 190203

11 years agoclang-cl: ignore /RTC options (PR17129)
Hans Wennborg [Fri, 6 Sep 2013 20:26:25 +0000 (20:26 +0000)]
clang-cl: ignore /RTC options (PR17129)

I don't think Clang intends to implement this functionality.
ASan should be used instead. Since /RTC is often passed by default
from MSBuild, ignore the option to avoid bloating the output.

llvm-svn: 190202

11 years agoAdd atomic_sub and atomic_dec builtin functions
Aaron Watry [Fri, 6 Sep 2013 20:20:21 +0000 (20:20 +0000)]
Add atomic_sub and atomic_dec builtin functions

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190201

11 years agoR600: Add support for LDS atomic subtract
Aaron Watry [Fri, 6 Sep 2013 20:17:42 +0000 (20:17 +0000)]
R600: Add support for LDS atomic subtract

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190200

11 years agoAdd Intrin.h to the cmake files.
Eric Christopher [Fri, 6 Sep 2013 20:11:28 +0000 (20:11 +0000)]
Add Intrin.h to the cmake files.

llvm-svn: 190199

11 years ago[PECOFF] Fix section alignment bug in ReaderCOFF.
Rui Ueyama [Fri, 6 Sep 2013 20:08:57 +0000 (20:08 +0000)]
[PECOFF] Fix section alignment bug in ReaderCOFF.

Patch by Ron Ofir.

llvm-svn: 190198

11 years agoclang-modernize: Tweak docs after rename
Edwin Vane [Fri, 6 Sep 2013 19:27:19 +0000 (19:27 +0000)]
clang-modernize: Tweak docs after rename

* Removing sphinx warnings about docs not in a toctree.
* Adding more links to cpp11-migrate redirect docs.

llvm-svn: 190195

11 years agoclang-modernize: Update docs with -include/-exclude
Edwin Vane [Fri, 6 Sep 2013 19:26:25 +0000 (19:26 +0000)]
clang-modernize: Update docs with -include/-exclude

-include/-exclude and friends have been marked as hidden options until this
point. This is no longer necessary. Update the docs to describe their effect.

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

llvm-svn: 190194

11 years agoDebug Info: Update testing case.
Manman Ren [Fri, 6 Sep 2013 18:46:30 +0000 (18:46 +0000)]
Debug Info: Update testing case.

DIBuilder now uses an identifier to reference DIType in containing type field of
a DICompositeType (in r190190).

llvm-svn: 190191

11 years agoDebug Info: Use identifier to reference DIType in containing type field of
Manman Ren [Fri, 6 Sep 2013 18:46:00 +0000 (18:46 +0000)]
Debug Info: Use identifier to reference DIType in containing type field of
a DICompositeType.

Verifier is updated accordingly.

llvm-svn: 190190

11 years agoDebug Info: Move a helper function getTypeIdentifier from DIBuilder to be part
Manman Ren [Fri, 6 Sep 2013 18:27:00 +0000 (18:27 +0000)]
Debug Info: Move a helper function getTypeIdentifier from DIBuilder to be part
of DIType.

Implement DIType::generateRef to return a type reference. This function will be
used in setContaintingType and in DIBuilder to generete the type reference.

No functionality change.

llvm-svn: 190188

11 years agoDebug Info Testing: Updated to use null instead of "i32 0" for containing-type
Manman Ren [Fri, 6 Sep 2013 18:13:59 +0000 (18:13 +0000)]
Debug Info Testing: Updated to use null instead of "i32 0" for containing-type
field of DICompositeType.

This will help the follow-on patch of using DITypeRef for containing-type field.

llvm-svn: 190187

11 years agodebuginfo-tests: Add support for an lldb wrapper script
Adrian Prantl [Fri, 6 Sep 2013 18:12:01 +0000 (18:12 +0000)]
debuginfo-tests: Add support for an lldb wrapper script
to be used on darwin in lieu of gdb.

llvm-svn: 190186

11 years agoAdd an lldb wrapper script that implements gdb-compatible commands on top
Adrian Prantl [Fri, 6 Sep 2013 18:10:44 +0000 (18:10 +0000)]
Add an lldb wrapper script that implements gdb-compatible commands on top
of lldb. This will be the new default method for executing the tests in
this repository on Darwin.
There is also a related patch for llvm/utils/test_debuginfo.pl coming.

I also relaxed some of the checks to work with both gdb's and lldb's
output.

llvm-svn: 190185

11 years agofix typos
Adrian Prantl [Fri, 6 Sep 2013 18:10:42 +0000 (18:10 +0000)]
fix typos

llvm-svn: 190184

11 years agoOpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivat...
Alexey Bataev [Fri, 6 Sep 2013 18:03:48 +0000 (18:03 +0000)]
OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp)

llvm-svn: 190183

11 years agomi-sched: cleanup register pressure update, remove a FIXME.
Andrew Trick [Fri, 6 Sep 2013 17:32:47 +0000 (17:32 +0000)]
mi-sched: cleanup register pressure update, remove a FIXME.

llvm-svn: 190181

11 years agomi-sched: improve regpressure tracing.
Andrew Trick [Fri, 6 Sep 2013 17:32:44 +0000 (17:32 +0000)]
mi-sched: improve regpressure tracing.

llvm-svn: 190180

11 years agomi-sched: print tree size in -view-misched-dags
Andrew Trick [Fri, 6 Sep 2013 17:32:42 +0000 (17:32 +0000)]
mi-sched: print tree size in -view-misched-dags

llvm-svn: 190179

11 years agomi-sched: register pressure update tracing.
Andrew Trick [Fri, 6 Sep 2013 17:32:39 +0000 (17:32 +0000)]
mi-sched: register pressure update tracing.

llvm-svn: 190178

11 years agomi-sched: Reorder Cyclicpath (latency) and CriticalMax (pressure) heuristics.
Andrew Trick [Fri, 6 Sep 2013 17:32:36 +0000 (17:32 +0000)]
mi-sched: Reorder Cyclicpath (latency) and CriticalMax (pressure) heuristics.

The latency based scheduling could induce spills in some cases.

llvm-svn: 190177

11 years agoAdded MachineSchedPolicy.
Andrew Trick [Fri, 6 Sep 2013 17:32:34 +0000 (17:32 +0000)]
Added MachineSchedPolicy.

Allow subtargets to customize the generic scheduling strategy.
This is convenient for targets that don't need to add new heuristics
by specializing the strategy.

llvm-svn: 190176

11 years agoDon't remove trailing escaped newline from line comments.
Alexander Kornienko [Fri, 6 Sep 2013 17:24:54 +0000 (17:24 +0000)]
Don't remove trailing escaped newline from line comments.

llvm-svn: 190175

11 years agomsbuild integration: provide separate files for VS2010 and VS2012
Hans Wennborg [Fri, 6 Sep 2013 17:05:46 +0000 (17:05 +0000)]
msbuild integration: provide separate files for VS2010 and VS2012

The previous msbuild integration only worked if VS2010 was installed. This patch
renames the current integration to LLVM-vs2010 and adds LLVM-vs2012.

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

llvm-svn: 190173

11 years agor189295 inadvertently set the codesigning identity for the debugserver Debug configur...
Jim Ingham [Fri, 6 Sep 2013 16:54:45 +0000 (16:54 +0000)]
r189295 inadvertently set the codesigning identity for the debugserver Debug configuration
to "", which causes debugging to fail for that configuration.  Setting it back to lldb_codesign.

llvm-svn: 190172

11 years agoRemove unused method Job::AddCommand.
Hans Wennborg [Fri, 6 Sep 2013 16:48:57 +0000 (16:48 +0000)]
Remove unused method Job::AddCommand.

I was going to update the comment referring to PipedJob, which was removed
some time ago, but then it turned out that this method is not actually used
at all.

llvm-svn: 190171

11 years agoavoid unnecessary direct access to LiveInterval::ranges
Matthias Braun [Fri, 6 Sep 2013 16:44:32 +0000 (16:44 +0000)]
avoid unnecessary direct access to LiveInterval::ranges

llvm-svn: 190170

11 years agoremove unused argument from LiveRanges::join()
Matthias Braun [Fri, 6 Sep 2013 16:44:29 +0000 (16:44 +0000)]
remove unused argument from LiveRanges::join()

llvm-svn: 190169

11 years agoremove pointless assert
Matthias Braun [Fri, 6 Sep 2013 16:44:27 +0000 (16:44 +0000)]
remove pointless assert

The if above it ensures the property anyway.

llvm-svn: 190168

11 years agofix comment
Matthias Braun [Fri, 6 Sep 2013 16:44:25 +0000 (16:44 +0000)]
fix comment

There's no 'B3' in the example.

llvm-svn: 190167

11 years agofix typo in comment
Matthias Braun [Fri, 6 Sep 2013 16:19:22 +0000 (16:19 +0000)]
fix typo in comment

llvm-svn: 190165

11 years ago[analyzer] SATestBuild: strip trailing newlines from command file.
Jordan Rose [Fri, 6 Sep 2013 16:12:41 +0000 (16:12 +0000)]
[analyzer] SATestBuild: strip trailing newlines from command file.

When running a make-based command, SATestBuild tries to append a -jN flag
with an appropriate N to run the build in parallel. However, it failed
to take into account that each line read includes a trailing newline
(unless it is the last line of a file without a trailing newline), which
resulted in the "-jN" appearing on a line on its own.

llvm-svn: 190164

11 years agoFollow up on commit r190159. Also test the KFreeBSD i686 platform defines + minor...
Sylvestre Ledru [Fri, 6 Sep 2013 15:36:36 +0000 (15:36 +0000)]
Follow up on commit r190159. Also test the KFreeBSD i686 platform defines + minor cosmetics

llvm-svn: 190162

11 years ago[sanitizer] Avoid including any system headers in the system-header-free part of...
Evgeniy Stepanov [Fri, 6 Sep 2013 15:34:17 +0000 (15:34 +0000)]
[sanitizer] Avoid including any system headers in the system-header-free part of the runtime library.

llvm-svn: 190161

11 years ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Fri, 6 Sep 2013 14:58:49 +0000 (14:58 +0000)]
[sanitizer] Fix Android build.

Android actually has "__unused" macro defined in <cdefs.h>.

llvm-svn: 190160

11 years agoAdd a test for the KFreeBSD define (#define __FreeBSD_kernel__ 1). This was introduce...
Sylvestre Ledru [Fri, 6 Sep 2013 14:53:07 +0000 (14:53 +0000)]
Add a test for the KFreeBSD define (#define __FreeBSD_kernel__ 1). This was introduced in commit r190048

llvm-svn: 190159

11 years agoclang-modernize: Remove -headers option
Edwin Vane [Fri, 6 Sep 2013 14:23:56 +0000 (14:23 +0000)]
clang-modernize: Remove -headers option

clang-modernize can now transform headers properly and the experimental
-headers option is no longer necessary.

Remember, at least -include is necessary for indicating which headers
are allowed to be changed.

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

llvm-svn: 190158

11 years ago[sanitizer] A bunch of linux system call handlers.
Evgeniy Stepanov [Fri, 6 Sep 2013 14:20:01 +0000 (14:20 +0000)]
[sanitizer] A bunch of linux system call handlers.

llvm-svn: 190157

11 years ago[mips][msa] Indentation
Daniel Sanders [Fri, 6 Sep 2013 13:25:06 +0000 (13:25 +0000)]
[mips][msa] Indentation

llvm-svn: 190156

11 years ago[mips][msa] Requires<[HasMSA]> is redundant, it is also supplied via inheritance
Daniel Sanders [Fri, 6 Sep 2013 13:15:05 +0000 (13:15 +0000)]
[mips][msa] Requires<[HasMSA]> is redundant, it is also supplied via inheritance

Tested with 'llvm-tblgen -print-records' which outputs identical records before
and after this patch.

llvm-svn: 190155

11 years agoThis patch adds support for microMIPS Multiply and Add/Sub instructions. Test cases...
Vladimir Medic [Fri, 6 Sep 2013 13:08:00 +0000 (13:08 +0000)]
This patch adds support for microMIPS Multiply and Add/Sub instructions. Test cases are included in patch.

llvm-svn: 190154

11 years ago[mips][msa] Made the operand register sets optional for the VEC formats
Daniel Sanders [Fri, 6 Sep 2013 13:01:47 +0000 (13:01 +0000)]
[mips][msa] Made the operand register sets optional for the VEC formats

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190153

11 years agoThis patch adds support for microMIPS Move to/from HI/LO instructions. Test cases...
Vladimir Medic [Fri, 6 Sep 2013 12:53:21 +0000 (12:53 +0000)]
This patch adds support for microMIPS Move to/from HI/LO instructions. Test cases are included in patch.

llvm-svn: 190152

11 years ago[mips][msa] Made the operand register sets optional for the ELM_INSVE formats
Daniel Sanders [Fri, 6 Sep 2013 12:50:52 +0000 (12:50 +0000)]
[mips][msa] Made the operand register sets optional for the ELM_INSVE formats

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190151

11 years ago[mips][msa] Made the operand register sets optional for the 3RF_4RF format
Daniel Sanders [Fri, 6 Sep 2013 12:44:13 +0000 (12:44 +0000)]
[mips][msa] Made the operand register sets optional for the 3RF_4RF format

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190150

11 years agoCorrect logic error found by inspection.
Ed Maste [Fri, 6 Sep 2013 12:43:14 +0000 (12:43 +0000)]
Correct logic error found by inspection.

From Jim's post on the lldb-dev mailing list:

  This code is there as a backstop for when the unwinder drops a frame at
  the beginning of new function/trampoline or whatever.

  In the (older_ctx_is_equivalent == false) case we will see if we are at
  a trampoline function that somebody knows how to get out of, and
  otherwise we will stop.

llvm-svn: 190149

11 years agoThis patch adds support for microMIPS Move Conditional instructions. Test cases are...
Vladimir Medic [Fri, 6 Sep 2013 12:41:17 +0000 (12:41 +0000)]
This patch adds support for microMIPS Move Conditional instructions. Test cases are included in patch.

llvm-svn: 190148

11 years agoSelectionDAG: create correct BooleanContent constants
Tim Northover [Fri, 6 Sep 2013 12:38:12 +0000 (12:38 +0000)]
SelectionDAG: create correct BooleanContent constants

Occasionally DAGCombiner can spot that a SETCC operation is completely
redundant and reduce it to "all true" or "all false". If this happens to a
vector, the value produced has to take account of what a normal comparison
would have produced, which may be an all-1s bitmask.

The fix in SelectionDAG.cpp is tested, however, as far as I can see the code in
TargetLowering.cpp is possibly unreachable and almost certainly irrelevant when
triggered so there are no tests. However, I believe it's still clearly the
right change and may save someone else some hassle if it suddenly becomes
reachable. So I'm doing it anyway.

llvm-svn: 190147

11 years ago[mips][msa] Made the operand register sets optional for the 3RF formats
Daniel Sanders [Fri, 6 Sep 2013 12:32:57 +0000 (12:32 +0000)]
[mips][msa] Made the operand register sets optional for the 3RF formats

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190146

11 years ago[mips][msa] Made the operand register sets optional for the 3R_4R format
Daniel Sanders [Fri, 6 Sep 2013 12:30:43 +0000 (12:30 +0000)]
[mips][msa] Made the operand register sets optional for the 3R_4R format

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190145

11 years agoThis patch adds support for microMIPS disassembler and disassembler make check tests.
Vladimir Medic [Fri, 6 Sep 2013 12:30:36 +0000 (12:30 +0000)]
This patch adds support for microMIPS disassembler and disassembler make check tests.

llvm-svn: 190144

11 years ago[mips][msa] Made the operand register sets optional for the 2RF format
Daniel Sanders [Fri, 6 Sep 2013 12:28:13 +0000 (12:28 +0000)]
[mips][msa] Made the operand register sets optional for the 2RF format

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190143

11 years ago[mips][msa] Made the operand register sets optional for the I8 format
Daniel Sanders [Fri, 6 Sep 2013 12:25:47 +0000 (12:25 +0000)]
[mips][msa] Made the operand register sets optional for the I8 format

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190142

11 years ago[mips][msa] Made the operand register sets optional for the I5 and SI5 formats
Daniel Sanders [Fri, 6 Sep 2013 12:23:19 +0000 (12:23 +0000)]
[mips][msa] Made the operand register sets optional for the I5 and SI5 formats

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190141

11 years ago[mips][msa] Made the operand register sets optional for the BIT_[BHWD] formats
Daniel Sanders [Fri, 6 Sep 2013 12:10:24 +0000 (12:10 +0000)]
[mips][msa] Made the operand register sets optional for the BIT_[BHWD] formats

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190140

11 years ago[ASan] make the check for NULL more portable.
Alexander Potapenko [Fri, 6 Sep 2013 12:04:37 +0000 (12:04 +0000)]
[ASan] make the check for NULL more portable.

llvm-svn: 190139

11 years ago[SystemZ] Tweak integer comparison code
Richard Sandiford [Fri, 6 Sep 2013 11:51:39 +0000 (11:51 +0000)]
[SystemZ] Tweak integer comparison code

The architecture has many comparison instructions, including some that
extend one of the operands.  The signed comparison instructions use sign
extensions and the unsigned comparison instructions use zero extensions.
In cases where we had a free choice between signed or unsigned comparisons,
we were trying to decide at lowering time which would best fit the available
instructions, taking things like extension type into account.  The code
to do that was getting increasingly hairy and was also making some bad
decisions.  E.g. when comparing the result of two LLCs, it is better to use
CR rather than CLR, since CR can be fused with a branch while CLR can't.

This patch removes the lowering code and instead adds an operand to
integer comparisons to say whether signed comparison is required,
whether unsigned comparison is required, or whether either is OK.
We can then leave the choice of instruction up to the normal isel code.

llvm-svn: 190138

11 years agoFix compiler warning introduced in r190022
Alexey Samsonov [Fri, 6 Sep 2013 11:08:12 +0000 (11:08 +0000)]
Fix compiler warning introduced in r190022

llvm-svn: 190137

11 years agoMigrate ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS to new spelling - ATTRIBUTE_NO_SANITIZE_...
Alexey Samsonov [Fri, 6 Sep 2013 11:07:33 +0000 (11:07 +0000)]
Migrate ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS to new spelling - ATTRIBUTE_NO_SANITIZE_ADDRESS

llvm-svn: 190136

11 years ago[tsan] make calloc crash instead of returning 0 on overflow (controlled by the alloca...
Kostya Serebryany [Fri, 6 Sep 2013 11:04:14 +0000 (11:04 +0000)]
[tsan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)

llvm-svn: 190135

11 years ago[mips][msa] Sorted MSA_BIT_[BHWD]_DESC_BASE into ascending order of element size
Daniel Sanders [Fri, 6 Sep 2013 11:01:38 +0000 (11:01 +0000)]
[mips][msa] Sorted MSA_BIT_[BHWD]_DESC_BASE into ascending order of element size

No functional change

llvm-svn: 190134

11 years ago[mips][msa] Made the operand register sets optional for the 3R format
Daniel Sanders [Fri, 6 Sep 2013 10:59:24 +0000 (10:59 +0000)]
[mips][msa] Made the operand register sets optional for the 3R format

Their default is to be the same as the result register set.

No functional change

llvm-svn: 190133

11 years ago[msan] make calloc crash instead of returning 0 on overflow (controlled by the alloca...
Kostya Serebryany [Fri, 6 Sep 2013 10:58:55 +0000 (10:58 +0000)]
[msan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)

llvm-svn: 190132

11 years ago[mips][msa] Made the InstrItinClass argument optional since it is always NoItinerary...
Daniel Sanders [Fri, 6 Sep 2013 10:55:15 +0000 (10:55 +0000)]
[mips][msa] Made the InstrItinClass argument optional since it is always NoItinerary at the moment.

No functional change

llvm-svn: 190131

11 years ago[SystemZ] Use XC for a memset of 0
Richard Sandiford [Fri, 6 Sep 2013 10:25:07 +0000 (10:25 +0000)]
[SystemZ] Use XC for a memset of 0

llvm-svn: 190130

11 years agoOpenCL allows the (pre/post)-(increment/decrement) operator on integer vector types,
David Tweed [Fri, 6 Sep 2013 09:58:08 +0000 (09:58 +0000)]
OpenCL allows the (pre/post)-(increment/decrement) operator on integer vector types,
so allow that case and add appropriate tests.

Patch by Ruiling Song!

llvm-svn: 190129

11 years ago[asan] make calloc crash instead of returning 0 on overflow (controlled by the alloca...
Kostya Serebryany [Fri, 6 Sep 2013 09:51:50 +0000 (09:51 +0000)]
[asan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)

llvm-svn: 190128

11 years ago[sanitizer] make the allocator crash instead of returning 0 on huge size (controlled...
Kostya Serebryany [Fri, 6 Sep 2013 09:25:11 +0000 (09:25 +0000)]
[sanitizer] make the allocator crash instead of returning 0 on huge size (controlled by the allocator_may_return_null flag)

llvm-svn: 190127

11 years agoclang-format: Fix regression introduced by r189353.
Daniel Jasper [Fri, 6 Sep 2013 08:54:24 +0000 (08:54 +0000)]
clang-format: Fix regression introduced by r189353.

Before:
  FirstToken->WhitespaceRange.getBegin()
      .getLocWithOffset(First->LastNewlineOffset);

After:
  FirstToken->WhitespaceRange.getBegin().getLocWithOffset(
      First->LastNewlineOffset);

Re-add logic to prevent breaking after an empty set of parentheses.
Basically it seems that calling a function without parameters is more
like navigating along the same object than it is a separate step of a
builder-type call.

We might need to extends this in future to allow "short" parameters that
e.g. are an index accessing a specific element.

llvm-svn: 190126