[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/cpuid.h:158 #define bit_BMI20x0100 +#define bit_INVCPID 0x0400 #define bit_ENH_MOVSB 0x0200 this should be below ENH_MOVSB to keep the bits in order

[PATCH] D47125: [X86] Remove masking from pternlog llvm intrinsics and use a select instruction instead.

2018-05-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Because the builtins take one of the arguments as an immediate, they must be implemented as macros. This was the frontend can verify that it's an imediate or a constant expression. Repository: rC Clang https://reviews.llvm.org/D47125

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-21 Thread Daniil Fukalov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332848: [AMDGPU] fixes for lds f32 builtins (authored by dfukalov, committed by ). Changed prior to commit: https://reviews.llvm.org/D43281?vs=142412=147801#toc Repository: rC Clang

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332847: [CodeGen] Recognize more cases of zero initialization (authored by sepavloff, committed by ). Changed prior to commit: https://reviews.llvm.org/D46241?vs=146091=147798#toc Repository: rC

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-21 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. What about the V9 `dX` and `qX` aliases and `f32` to `f63`? Repository: rC Clang https://reviews.llvm.org/D47137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r332847 - [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Mon May 21 09:09:54 2018 New Revision: 332847 URL: http://llvm.org/viewvc/llvm-project?rev=332847=rev Log: [CodeGen] Recognize more cases of zero initialization If a variable has an initializer, codegen tries to build its value. If the variable is large in size, building

[PATCH] D47138: [Sparc] Use the leon arch for Leon3's when using an external assembler

2018-05-21 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. There are more leon-based v8 CPUs listed in clang/lib/Basic/Targets/Sparc.cpp, which need to be listed here, also. Separately, I think it'd be a good idea to refactor to put this info into the SparcCPUInfo struct, so that it's harder for them to get out of sync.

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added subscribers: cfe-commits, mgorny. An intrinsic for an old instruction, as described in the Intel SDM. Repository: rC Clang https://reviews.llvm.org/D47142 Files: include/clang/Basic/BuiltinsX86.def

[PATCH] D45783: [DEBUGINFO, NVPTX] Render `-no-cuda-debug` LLVM option when required.

2018-05-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D45783#1106019, @echristo wrote: > So, I'd really prefer not to set options via the backend option path. From > here I think we should aim to take all of the options we added and having the > asm printer in the backend know how to set them

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, with a small nit. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:78 E = E->IgnoreImpCasts(); + if (auto *EC = dyn_cast(E)) +E =

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-21 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Can you add a test that we support this? clang/test/CodeGen/sparcv8-inline-asm.c would be a good place to add a test case similar to that in clang/test/CodeGen/aarch64-inline-asm.c : test_gcc_registers. Repository: rC Clang https://reviews.llvm.org/D47137

[PATCH] D46439: [Sema] Fix incorrect packed aligned structure layout

2018-05-21 Thread Momchil Velikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332843: [Sema] Fix incorrect packed aligned structure layout (authored by chill, committed by ). Changed prior to commit: https://reviews.llvm.org/D46439?vs=145687=147781#toc Repository: rC Clang

r332843 - [Sema] Fix incorrect packed aligned structure layout

2018-05-21 Thread Momchil Velikov via cfe-commits
Author: chill Date: Mon May 21 07:28:43 2018 New Revision: 332843 URL: http://llvm.org/viewvc/llvm-project?rev=332843=rev Log: [Sema] Fix incorrect packed aligned structure layout Handle attributes before checking the record layout (e.g. underalignment check during `alignas` processing), as

[PATCH] D46439: [Sema] Fix incorrect packed aligned structure layout

2018-05-21 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. Thanks a lot! https://reviews.llvm.org/D46439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-21 Thread Alfred Zien via Phabricator via cfe-commits
QF5690 added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1018 +def warn_objc_property_assign_on_object : Warning< + "'assign' attribute must not be of object type, use 'unsafe_unretained' instead">, + InGroup, DefaultIgnore;

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D45835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D44539#1106152, @rjmccall wrote: > This was approved by the Objective-C language group as a default-off warning. We usually do not expose new default-off warnings because experience shows that they rarely ever get enabled by users. If

[PATCH] D47138: [Sparc] Use the leon arch for Leon3's when using an external assembler

2018-05-21 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman created this revision. dcederman added a reviewer: jyknight. Herald added subscribers: cfe-commits, jrtc27, fedor.sergeev. This allows the use of the casa instruction available in most Leon3's. Repository: rC Clang https://reviews.llvm.org/D47138 Files:

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-21 Thread Daniel Cederman via Phabricator via cfe-commits
dcederman created this revision. dcederman added a reviewer: jyknight. Herald added subscribers: cfe-commits, jrtc27, fedor.sergeev. Repository: rC Clang https://reviews.llvm.org/D47137 Files: lib/Basic/Targets/Sparc.cpp Index: lib/Basic/Targets/Sparc.cpp

[PATCH] D46472: [HIP] Support offloading by linker script

2018-05-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp:1371-1388 + // machines. + LksStream << "/*\n"; + LksStream << " HIP Offload Linker Script\n"; + LksStream << " *** Automatically generated by Clang ***\n"; + LksStream << "*/\n";

[PATCH] D47135: [analyzer][WIP] A checker for dangling string pointers in C++

2018-05-21 Thread Henry Wong via Phabricator via cfe-commits
MTC added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DanglingStringPointerChecker.cpp:59 + QualType RegType = TypedR->getValueType(); + if (RegType.getAsString() != "std::string") +return; A little tip, there are other string types besides

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 147775. GBuella added a comment. Fixed a horrible bug in the patch. Adding a ref to temporary string is not a wise thing to do, so I had to remove this line: ReqFeatures.push_back(F.substr(1)); Now the ReqFeatures vector can also refer to strings

[PATCH] D46805: If some platforms do not support an attribute, we should exclude the platform

2018-05-21 Thread Li Jia He via Phabricator via cfe-commits
HLJ2009 updated this revision to Diff 147773. HLJ2009 added a comment. Herald added a subscriber: aheejin. listing the object formats that *do* support aliases seems reasonable Repository: rC Clang https://reviews.llvm.org/D46805 Files: include/clang/Basic/Attr.td

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. Ping @efriedma Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47108: Add -fforce-emit-vtables

2018-05-21 Thread Krzysztof Pszeniczny via Phabricator via cfe-commits
amharc requested changes to this revision. amharc added a comment. This revision now requires changes to proceed. This is not sound: sometimes the forcefully emitted vtable is incorrect due to destructor aliasing. This happens e.g. in the Bullet benchmark from the llvm test suite. A simplified

[PATCH] D46685: [CodeGen] Disable structor optimizations at -O0

2018-05-21 Thread Pavel Labath via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC332839: [CodeGen] Disable aggressive structor optimizations at -O0, take 2 (authored by labath, committed by ). Changed

r332839 - [CodeGen] Disable aggressive structor optimizations at -O0, take 2

2018-05-21 Thread Pavel Labath via cfe-commits
Author: labath Date: Mon May 21 04:47:45 2018 New Revision: 332839 URL: http://llvm.org/viewvc/llvm-project?rev=332839=rev Log: [CodeGen] Disable aggressive structor optimizations at -O0, take 2 The first version of the patch (r332228) was flawed because it was putting structors into C5/D5

[PATCH] D47135: [analyzer][WIP] A checker for dangling string pointers in C++

2018-05-21 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity, mgorny. This check marks a raw pointer to a C++ string object's inner buffer "released" when the object itself is

[PATCH] D46910: [Support] Avoid normalization in sys::getDefaultTargetTriple

2018-05-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. > Sorry about the breakage, I wasn't aware of that test failure and never got > any email (probably because the bot has been red before). I'll try to fix > make_itanium_abi_triple and test it on my Windows box tomorrow before > resubmitting. Thanks, sounds good.

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-21 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. I think this will work, one inline comment. Might also be good to get a few different test cases, e.g. one where we're not seeing the alphabetically first as the minimum :) Comment at: lib/CodeGen/CodeGenModule.h:1085 +

[PATCH] D44888: [RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxation

2018-05-21 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 147739. shiva0217 retitled this revision from "[RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags" to "[RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxation". shiva0217 edited the summary of this revision.

[PATCH] D47125: [X86] Remove masking from pternlog llvm intrinsics and use a select instruction instead.

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. So do these really need to be implemented as macros? Repository: rC Clang https://reviews.llvm.org/D47125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46944: [analyzer] Use sufficiently large types for index/size calculation.

2018-05-21 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 147738. ebevhan edited the summary of this revision. ebevhan added a comment. Made ArrayIndexTy into ssize_t, consolidated the tests and fixed the test that was failing. https://reviews.llvm.org/D46944 Files:

[PATCH] D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute

2018-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This was approved by the Objective-C language group as a default-off warning. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1018 +def warn_objc_property_assign_on_object : Warning< + "'assign' attribute must not be of object type, use

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-05-21 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:760 (!Style.AllowAllParametersOfDeclarationOnNextLine && State.Line->MustBeDeclaration) || +(!Style.AllowAllArgumentsOnNextLine && This still looks

[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332830: [X86] Remove some preprocessor feature checks from intrinsic headers (authored by ctopper, committed by ). Repository: rC Clang https://reviews.llvm.org/D47029 Files:

r332830 - [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-21 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sun May 20 23:07:49 2018 New Revision: 332830 URL: http://llvm.org/viewvc/llvm-project?rev=332830=rev Log: [X86] Remove some preprocessor feature checks from intrinsic headers Summary: These look to be a couple things that weren't removed when we switched to target

<    1   2