[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 'unsafe

[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: include/clang/StaticAnalyzer/Core/PathSensiti

[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] 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. R

[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 + TargetAttr::ParsedTargetAtt

[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. Reading

[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 destro

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&view=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 c

[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 p

[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 e

[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] 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 test/Sema/attr-alias-ha

[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 starting

[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 `st

[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] 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] 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: lib/Driver/ToolChains/Arch

[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] 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 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; rjmccal

[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

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&view=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
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&id=147781#toc Repository: rC Clang

[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 = 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] 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 de

[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 includ

[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. Repo

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&view=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, build

[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&id=147798#toc Repository: rC C

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[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&id=147801#toc Repository: rC Clang https://revie

[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] 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 Comment

r332852 - [OPENMP-SIMD] Fix PR37536: Fix definition of _OPENMP macro.

2018-05-21 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon May 21 09:40:32 2018 New Revision: 332852 URL: http://llvm.org/viewvc/llvm-project?rev=332852&view=rev Log: [OPENMP-SIMD] Fix PR37536: Fix definition of _OPENMP macro. if `-fopenmp-simd` is specified alone, `_OPENMP` macro should not be defined. If `-fopenmp-simd` is s

[PATCH] D47097: [WIP][DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I think CodeGenFunction::EmitParmDecl is the right place to set up an ApplyDebugLocation instance. You can look at CodeGenFunction::EmitAutoVarInit for an example of how to use ApplyDebugLocation. Comment at: test/CodeGen/debug-info-preserve-scope.c:1 +//

[PATCH] D47150: [Clang Tablegen] Add default case to getModifierName()

2018-05-21 Thread Mark Searles via Phabricator via cfe-commits
msearles created this revision. msearles added reviewers: b-sumner, kzhuravl, EricWF, rjmccall. Herald added subscribers: ioeric, ilya-biryukov. Fix internal build failure: ../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o ../../../ClangDiagnosticsEmitter.cpp: In function

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Why do we need a feature flag for this in the first place? The MSVC model for most "instruction" intrinsics is that the exact instruction is emitted regardless of the feature enabled. The target attribute seems like it would get in the way of that. Comme

[PATCH] D47150: [Clang Tablegen] Add default case to getModifierName()

2018-05-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please instead add an `llvm_unreachable` outside the switch, so that we still get warnings on missing switch cases if an enumerator is added. https://reviews.llvm.org/D47150 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2018-05-21 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM - I'd love to see constexpr arguments someday in C/C++ to avoid all of these macro shenanigans... Repository: rC Clang https://reviews.llvm.org/D47125 ___

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

2018-05-21 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added a comment. Adding a preliminary test file. F6259981: tests.cpp Repository: rC Clang https://reviews.llvm.org/D47135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D47150: [Clang Tablegen] Add llvm_unreachable() to getModifierName()

2018-05-21 Thread Mark Searles via Phabricator via cfe-commits
msearles updated this revision to Diff 147807. msearles retitled this revision from "[Clang Tablegen] Add default case to getModifierName()" to "[Clang Tablegen] Add llvm_unreachable() to getModifierName()". msearles added a comment. Ah, yes. Adding llvm_unreachable() is better. Done. https:/

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D47142#1106664, @rnk wrote: > Why do we need a feature flag for this in the first place? The MSVC model for > most "instruction" intrinsics is that the exact instruction is emitted > regardless of the feature enabled. The target attribute see

[PATCH] D47044: [analyzer] Ensure that we only visit a destructor for a reference if type information is available.

2018-05-21 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. Hmm... Thanks for these tips. I'll see what I can find. Repository: rC Clang https://reviews.llvm.org/D47044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif rnk wrote: > craig.topper wrote: > > @rnk, what's the right thing to do here? > What problems does this redeclaration cause? Now that I

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif GBuella wrote: > GBuella wrote: > > rnk wrote: > > > craig.topper wrote: > > > > @rnk, what's the right thing to do here? > > > What problem

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif GBuella wrote: > rnk wrote: > > craig.topper wrote: > > > @rnk, what's the right thing to do here? > > What problems does this redeclara

[PATCH] D47150: [Clang Tablegen] Add llvm_unreachable() to getModifierName()

2018-05-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Comment at: utils/TableGen/ClangDiagnosticsEmitter.cpp:495 } + llvm_unreachable("invalid modifier type"); } Perhaps this should say "unhandled cas

[PATCH] D47150: [Clang Tablegen] Add llvm_unreachable() to getModifierName()

2018-05-21 Thread Mark Searles via Phabricator via cfe-commits
msearles updated this revision to Diff 147809. msearles added a comment. Add comment per reviewer suggestion. https://reviews.llvm.org/D47150 Files: utils/TableGen/ClangDiagnosticsEmitter.cpp Index: utils/TableGen/ClangDiagnosticsEmitter.cpp =

[PATCH] D47150: [Clang Tablegen] Add llvm_unreachable() to getModifierName()

2018-05-21 Thread Mark Searles via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332854: [Clang Tablegen] Add llvm_unreachable() to getModifierName() (authored by msearles, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D47

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

2018-05-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I think you can pass StringRef(F).substr(1). That won't create a temporary string. It will just create a StringRef pointing into the middle of an existing std::string stored in the parsed attributes. https://reviews.llvm.org/D46541 _

[PATCH] D47118: [modules] Print input files when -module-file-info file switch is passed.

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks for improving this Vassil. Where does in the output it shows up? I wonder if we should have those at the end given the huge amount of headers some modules might have. Repository: rC Clang https://reviews.llvm.org/D47118 __

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. So I think we've covered the whether this is ok to do questions. If someone can double check signed/unsigned and vector element sizes are all correct and approve this that would be great. Repository: rC Clang https://reviews.llvm.org/D46863 _

r332848 - [AMDGPU] fixes for lds f32 builtins

2018-05-21 Thread Daniil Fukalov via cfe-commits
Author: dfukalov Date: Mon May 21 09:18:07 2018 New Revision: 332848 URL: http://llvm.org/viewvc/llvm-project?rev=332848&view=rev Log: [AMDGPU] fixes for lds f32 builtins 1. added restrictions to memory scope, order and volatile parameters 2. added custom processing for these builtins - currently

r332854 - [Clang Tablegen] Add llvm_unreachable() to getModifierName()

2018-05-21 Thread Mark Searles via cfe-commits
Author: msearles Date: Mon May 21 10:29:08 2018 New Revision: 332854 URL: http://llvm.org/viewvc/llvm-project?rev=332854&view=rev Log: [Clang Tablegen] Add llvm_unreachable() to getModifierName() Fix internal build failure: ../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o ../../

[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. In https://reviews.llvm.org/D44539#1106443, @aaron.ballman wrote: > 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 warnin

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

2018-05-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. This looks great, i think we should make a single super simple mock test and commit this. @MTC, i really appreciate your help! Comment at: lib/StaticAnalyzer/Checkers/DanglingStringPointerChecker.cpp:59 + QualType RegType = TypedR->getValueType(); + if

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 147829. bruno added a comment. Update testcases (and fixed a missing one) after Duncan's review. https://reviews.llvm.org/D46485 Files: CMakeLists.txt test/CMakeLists.txt test/Modules/crash-vfs-headermaps.m test/Preprocessor/Inputs/headermap-rel/foo.h

[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#1106802, @rjmccall wrote: > In https://reviews.llvm.org/D44539#1106443, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D44539#1106152, @rjmccall wrote: > > > > > This was approved by the Objective-C language group as a def

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-21 Thread David Kreitzer via Phabricator via cfe-commits
DavidKreitzer accepted this revision. DavidKreitzer added a comment. This revision is now accepted and ready to land. I had actually done that as part of my initial review, so LGTM. Repository: rC Clang https://reviews.llvm.org/D46863 ___ cfe-com

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif rnk wrote: > GBuella wrote: > > GBuella wrote: > > > rnk wrote: > > > > craig.topper wrote: > > > > > @rnk, what's the right thing to do

[PATCH] D47154: Try to make builtin address space declarations not useless

2018-05-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: Anastasia, yaxunl, rjmccall. Herald added subscribers: tpr, nhaehnle, wdng. The way address space declarations for builtins currently work is nearly useless. The code assumes the address spaces used for builtins is a confusingly named "target a

[PATCH] D47155: [analyzer] Reduce simplifySVal complexity threshold further.

2018-05-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. Reported by Mikael Holmén on http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180416/225349.html - a combinati

[PATCH] D47155: [analyzer] Reduce simplifySVal complexity threshold further.

2018-05-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: mikhail.ramalho. NoQ added a subscriber: mikhail.ramalho. NoQ added a comment. @mikhail.ramalho Does it solve your problems with ffmpeg as well? :) Repository: rC Clang https://reviews.llvm.org/D47155 ___ cfe-commits mailing

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

2018-05-21 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 147836. zinovy.nis edited the summary of this revision. zinovy.nis added a comment. - More accurate place to fix. https://reviews.llvm.org/D47122 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp test/clang-tidy/readability-simplify-bool-exp

[PATCH] D47097: [WIP][DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 147838. gramanas added a comment. - Apply debug location Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/debug-info-preserve-scope.c Index: test/CodeGen/debug-info-preserve-scope.c ==

[PATCH] D47097: [WIP][DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 147840. gramanas marked an inline comment as done. gramanas added a comment. Update according to the comments Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/debug-info-preserve-scope.c Index: test/C

[PATCH] D47097: [WIP][DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2062 EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true); +ApplyDebugLocation::CreateArtificial(*this); + } There are two issues here: 1) ApplyDebugLocation is a RAII helper, which mea

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

2018-05-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. This wouldn't be another layout/ABI breakage, would it? Repository: rC Clang https://reviews.llvm.org/D46439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2018-05-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a subscriber: andrew.w.kaylor. efriedma added a comment. I don't see any reason to exactly match the constant specified by the user, as long as the result is semantically equivalent. Once we have llvm.experimental.constrained.fcmp, this code should be updated to emit it; that wil

r332879 - Revert r332028; see PR37545 for details.

2018-05-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 21 13:10:54 2018 New Revision: 332879 URL: http://llvm.org/viewvc/llvm-project?rev=332879&view=rev Log: Revert r332028; see PR37545 for details. Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp Modified: cfe/trunk/l

r332881 - CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it up to dwo output.

2018-05-21 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon May 21 13:16:41 2018 New Revision: 332881 URL: http://llvm.org/viewvc/llvm-project?rev=332881&view=rev Log: CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it up to dwo output. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47089

[PATCH] D47089: CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it up to dwo output.

2018-05-21 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332881: CodeGen: Add a dwo output file argument to addPassesToEmitFile and hook it up… (authored by pcc, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: dexonsmith, ributzka, steven_wu. Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header, example, for A.h added in the tests: ... A.framework/Headers/A.h:2:10: warning:

Re: r332847 - [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Richard Smith via cfe-commits
On 21 May 2018 at 09:09, Serge Pavlov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: sepavloff > Date: Mon May 21 09:09:54 2018 > New Revision: 332847 > > URL: http://llvm.org/viewvc/llvm-project?rev=332847&view=rev > Log: > [CodeGen] Recognize more cases of zero initialization > >

r332882 - [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-21 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon May 21 13:19:17 2018 New Revision: 332882 URL: http://llvm.org/viewvc/llvm-project?rev=332882&view=rev Log: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics. I believe this is safe assuming default default F

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed float conversion intrinsics.

2018-05-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332882: [X86] Use __builtin_convertvector to implement some of the packed integer to… (authored by ctopper, committed by ). Changed prior to commit: https://reviews.llvm.org/D46863?vs=146750&id=147853#t

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Depends on https://reviews.llvm.org/D46485 Repository: rC Clang https://reviews.llvm.org/D47157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r332847 - [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Richard Smith via cfe-commits
On 21 May 2018 at 13:22, Richard Smith wrote: > On 21 May 2018 at 09:09, Serge Pavlov via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: sepavloff >> Date: Mon May 21 09:09:54 2018 >> New Revision: 332847 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=332847&view=rev >> Log:

r332885 - CodeGen, Driver: Start using direct split dwarf emission in clang.

2018-05-21 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon May 21 13:31:59 2018 New Revision: 332885 URL: http://llvm.org/viewvc/llvm-project?rev=332885&view=rev Log: CodeGen, Driver: Start using direct split dwarf emission in clang. Fixes PR37466. Differential Revision: https://reviews.llvm.org/D47093 Added: cfe/trunk/test/Mi

[PATCH] D47093: CodeGen, Driver: Start using direct split dwarf emission in clang.

2018-05-21 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332885: CodeGen, Driver: Start using direct split dwarf emission in clang. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D47093?vs=147609&id=147858#toc Repository:

Re: r332847 - [CodeGen] Recognize more cases of zero initialization

2018-05-21 Thread Richard Smith via cfe-commits
Reverted in r332886; I added a testcase for the miscompile below to test/CodeGenCXX/reference-init.cpp On 21 May 2018 at 13:28, Richard Smith wrote: > On 21 May 2018 at 13:22, Richard Smith wrote: > >> On 21 May 2018 at 09:09, Serge Pavlov via cfe-commits < >> cfe-commits@lists.llvm.org> wrote:

r332886 - Revert r332847; it caused us to miscompile certain forms of reference initialization.

2018-05-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 21 13:36:58 2018 New Revision: 332886 URL: http://llvm.org/viewvc/llvm-project?rev=332886&view=rev Log: Revert r332847; it caused us to miscompile certain forms of reference initialization. Added: cfe/trunk/test/SemaCXX/large-array-init.cpp - copied unchang

[PATCH] D47099: Disable casting of alloca for ActiveFlag

2018-05-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 147860. yaxunl added a comment. Add CreateMemTempWithoutCast and CreateTempAllocaWithoutCast by John's comments. https://reviews.llvm.org/D47099 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGCleanup.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunctio

r332891 - [X86] Remove masking from pternlog llvm intrinsics and use a select instruction instead.

2018-05-21 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon May 21 13:58:23 2018 New Revision: 332891 URL: http://llvm.org/viewvc/llvm-project?rev=332891&view=rev Log: [X86] Remove masking from pternlog llvm intrinsics and use a select instruction instead. Because the intrinsics in the headers are implemented as macros, we can't

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also PR22165. Repository: rC Clang https://reviews.llvm.org/D47157 ___ 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 added a comment. I think that `MarkVTableUsed` should be called somewhere in Sema (possibly `ActOnFinishCXXMemberDecls`?) if `ForceEmitVTables` is on. This probably requires making `ForceEmitVTables` a `LangOption` in addition to it being a `CodeGenOption`. This causes the above example

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

2018-05-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332891: [X86] Remove masking from pternlog llvm intrinsics and use a select instruction… (authored by ctopper, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revie

[PATCH] D47161: update

2018-05-21 Thread Anastasis via Phabricator via cfe-commits
gramanas created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D47161 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/debug-info-preserve-scope.c Index: test/CodeGen/debug-info-preserve-scope.c

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > The warning is off by default. We typically do not add off-by-default warnings because experience has shown the rarely get enabled in practice. Can you explain a bit more about why this one is off by default? Repository: rC Clang https://reviews.llvm.org/D4

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

2018-05-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1414-1415 +Expr::EvalResult Result; +if (Init->EvaluateAsRValue(Result, CE.CGM.getContext()) && +!Result.hasUnacceptableSideEffect(Expr::SE_NoSideEffects)) + return (Result.Val.isInt() &

[PATCH] D47099: Disable casting of alloca for ActiveFlag

2018-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:80 auto Alloca = CreateTempAlloca(Ty, Name, ArraySize); Alloca->setAlignment(Align.getQuantity()); if (AllocaAddr) Could you change this to call CreateTempAllocaWithoutCast? https://rev

[libcxx] r332901 - Implement deduction guides for vector

2018-05-21 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon May 21 14:30:12 2018 New Revision: 332901 URL: http://llvm.org/viewvc/llvm-project?rev=332901&view=rev Log: Implement deduction guides for vector Added: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp libcxx/trunk/test/std/contain

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Anastasis via Phabricator via cfe-commits
gramanas updated this revision to Diff 147876. gramanas added a comment. Update diff Repository: rC Clang https://reviews.llvm.org/D47097 Files: lib/CodeGen/CGDecl.cpp test/CodeGen/debug-info-preserve-scope.c Index: test/CodeGen/debug-info-preserve-scope.c =

[PATCH] D47097: [DebugInfo] Preserve scope in auto generated StoreInst

2018-05-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2074 + if (DoStore) { + auto DL = ApplyDebugLocation::CreateArtificial(*this); + EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true); Ideally this would precede the calls to CreateMemTemp w

[PATCH] D46925: [Fixed Point Arithmetic] Remaining Binary Operations on Primary Fixed Point Types

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147880. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46925 Files: include/clang/AST/ASTContext.h include/clang/AST/OperationKinds.def include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp

r332906 - Fix another make_unique ambiguity.

2018-05-21 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon May 21 14:48:17 2018 New Revision: 332906 URL: http://llvm.org/viewvc/llvm-project?rev=332906&view=rev Log: Fix another make_unique ambiguity. Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL: http://llvm.org/viewvc/ll

[PATCH] D46926: [Fixed Point Arithmetic] Conversion between Fixed Point and Floating Point Numbers

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147881. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46926 Files: include/clang/AST/OperationKinds.def include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/CodeGe

[PATCH] D46927: [Fixed Point Arithmetic] Augmented Assignment for Fixed Point Types

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147882. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46927 Files: include/clang/AST/Type.h lib/AST/Type.cpp lib/CodeGen/CGExprScalar.cpp lib/Sema/SemaExpr.cpp test/Frontend/fixed_point_validation.c

[PATCH] D46960: [Fixed Point Arithmetic] Predefined Precision Macros

2018-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 147883. leonardchan added a comment. formatting Repository: rC Clang https://reviews.llvm.org/D46960 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPMacroExpansion.cpp test/Frontend/fixed_point_builtin_macros.c Index: test/Frontend/fixed_poi

  1   2   >