[llvm-bugs] [Bug 24499] inline assembler causes an assertion

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=24499

michael  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||michael.zucker...@intel.com
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25390] New: _Generic -Wdivision-by-zero bogus warning

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25390

Bug ID: 25390
   Summary: _Generic -Wdivision-by-zero bogus warning
   Product: clang
   Version: 3.5
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: egg...@cs.ucla.edu
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 15208
  --> https://llvm.org/bugs/attachment.cgi?id=15208&action=edit
program illustrating bogus warning

With the attached program, clang complains

u.c:5:47: warning: division by zero is undefined [-Wdivision-by-zero]
  int j = _Generic (i, int: 0, default: 0 ? 1 / 0 : 1);
  ^ ~

The warning is bogus because the expression is not evaluated, for two reasons:
first, it's inside a _Generic alternative not taken; second, it's inside an
if-branch that's not taken.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25371] Kaleidoscope Tutorial Ch2 falsely claims that it doesn't depend on LLVM

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25371

Lang Hames  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Lang Hames  ---
Thanks very much Dave!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25391] New: [PATCH] libc++ is too pessimistic about features supported by current gcc

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25391

Bug ID: 25391
   Summary: [PATCH] libc++ is too pessimistic about features
supported by current gcc
   Product: libc++
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: b...@linaro.org
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
Classification: Unclassified

Created attachment 15209
  --> https://llvm.org/bugs/attachment.cgi?id=15209&action=edit
Patch fixing this relative to current svn trunk (rev 251949)

libc++ currently assumes gcc doesn't support variable templates, noexcept,
trailing return or always inline variadics.

All of those features are supported by gcc >= 5.0 if
-std=c++11/-std=gnu++11/-std=c++14/std=gnu++14 was passed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25383] clang dies on abort trap when parsing format string "%*D" for custom printf-like function

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25383

Anton Rang  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Anton Rang  ---
This bug only existed in FreeBSD's clang 3.3 fork.

In clang 3.7 on FreeBSD, using the __freebsd_kprintf__ format, the proper
warning
is generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25392] New: Assertion `ThisRegion && "ThisValue was not a memory region"' failed

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25392

Bug ID: 25392
   Summary: Assertion `ThisRegion && "ThisValue was not a memory
region"' failed
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: release blocker
  Priority: P
 Component: Static Analyzer
  Assignee: kreme...@apple.com
  Reporter: ale...@google.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

We've started seeing assertion failures in all static analyzer checks on a
large number of translation units in our code base. This started happening
somewhere after r246545. 

Here's a repro:

$ cat sa1.cc
struct x0;
template  struct x1 { typedef x0 x2; };
template  struct x5 {
public:
  typename x1::x2 operator[](int) {}
};
struct x0 {
public:
  template  void x6() const;
  x5 x7;
} x8;
void x9() { x8.x7[0].x6>(); }


$ clang-tidy -checks=-*,clang-analyzer-unix.API sa1.cc  -- -std=c++11
llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp:441: virtual void
clang::ento::CXXInstanceCall::getExtraInvalidatedValues(ValueList &,
clang::ento::RegionAndSymbolInvalidationTraits *) const: Assertion `ThisRegion
&& "ThisValue was not a memory region"' failed.
Aborted (core dumped)

Here's the relevant stack trace:
*** SIGSEGV (@0x10), see go/cppdebug received by PID 23704 (TID 23704); stack
trace: ***
PC: @  0x135f0f4  (unknown)  clang::ento::MemRegion::getBaseRegion()
@  0x19f120d928  FailureSignalHandler()
@ 0x7fa928aa9390   1488  __restore_rt
@  0x1380c7f448 
clang::ento::CallEvent::invalidateRegions()
@  0x13ab23e144 
clang::ento::ExprEngine::conservativeEvalCall()
@  0x13abde8144  clang::ento::ExprEngine::defaultEvalCall()
@  0x139d49d352 
clang::ento::CheckerManager::runCheckersForEvalCall()
@  0x13aaf8a368  clang::ento::ExprEngine::evalCall()
@  0x13aac77384  clang::ento::ExprEngine::VisitCallExpr()
@  0x1389b18   1248  clang::ento::ExprEngine::Visit()
@  0x1386257400  clang::ento::ExprEngine::ProcessStmt()
@  0x1385eec 96 
clang::ento::ExprEngine::processCFGElement()
@  0x139727e160 
clang::ento::CoreEngine::dispatchWorkItem()
@  0x1396e7a192  clang::ento::CoreEngine::ExecuteWorkList()
@   0xb41d82   1120  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
@   0xb41891288  (anonymous
namespace)::AnalysisConsumer::HandleCode()
@   0xb34c54480  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
@   0xd31a9c 48 
clang::MultiplexConsumer::HandleTranslationUnit()
@   0xe3d832144  clang::ParseAST()
@   0xd4988f 48  clang::FrontendAction::Execute()
@   0xc7a542 96  clang::CompilerInstance::ExecuteAction()
@   0xc332b5352 
clang::tooling::FrontendActionFactory::runInvocation()
@   0xc330fe 64 
clang::tooling::ToolInvocation::runInvocation()
@   0xc32c0a   1440  clang::tooling::ToolInvocation::run()
@   0xc341aa   1040  clang::tooling::ClangTool::run()
@   0xa17f65   1952  clang::tidy::runClangTidy()
@   0x435b20   1344  main
@ 0x7fa9284fcce8208  __libc_start_main
@   0x434af9  (unknown)  _start

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25393] New: running INSTALL target for clang-cl RelWithDebugInfo build breaks

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25393

Bug ID: 25393
   Summary: running INSTALL target for clang-cl RelWithDebugInfo
build breaks
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: froy...@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Building clang-cl with r251933 according to
http://llvm.org/docs/GettingStartedVS.html works fine.  However, building the
INSTALL target, as the documentation suggests results in:

Error1error MSB3073: The command "setlocal
"c:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=RelWithDebInfo -P
cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets1325  
 INSTALL

Building the install-clang target errors similarly:

Error101error MSB6006: "cmd.exe" exited with code 1.C:\Program
Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets170 
  5install-clang

I can't tell which directory (if any) this particular error is coming from.

Looking at ${CMAKE_INSTALL_PREFIX}/bin/, it appears that llvm-tblgen.exe has
been installed, headers have been installed in
${CMAKE_INSTALL_PREFIX}/include/, and .lib files have been installed in
${CMAKE_INSTALL_PREFIX}/lib/.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25394] New: Execute SCoP conditionally moves trivial PHI nodes and thereby causes dominace problems

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25394

Bug ID: 25394
   Summary: Execute SCoP conditionally moves trivial PHI nodes and
thereby causes dominace problems
   Product: Projects
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Polly
  Assignee: polly-...@googlegroups.com
  Reporter: doerf...@cs.uni-saarland.de
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 15212
  --> https://llvm.org/bugs/attachment.cgi?id=15212&action=edit
Testcase

As the summary states, the executeScopConditionally uses the splitEdge function
that will cause all tivial PHI nodes (one incoming value) in the region entry
block to be moved to the "original" entry block that is now reachable from
polly.split_new_and_old. However, that changes the dominance relation and if
this happens in a loop (around the SCoP) the trivial PHI value cannot be used
in the header any more.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25395] New: trunk clang assert/crash building compiler-rt

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25395

Bug ID: 25395
   Summary: trunk clang assert/crash building compiler-rt
   Product: clang
   Version: trunk
  Hardware: Macintosh
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: di...@apple.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 15213
  --> https://llvm.org/bugs/attachment.cgi?id=15213&action=edit
extendhfsf2-163a99.sh_c is the build script and the preprocessed file
concatenated together.

FAILED: ./llvm_build/./bin/clang   -fPIC -fvisibility=hidden
-DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -g -arch armv7em-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk
-mmacosx-version-min=10.5 -arch armv7em -mfloat-abi=hard -target
thumbv7-apple-darwin-eabi -MMD -MT
lib/builtins/CMakeFiles/clang_rt.hard_pic_armv7em_macho_embedded.dir/extendhfsf2.c.o
-MF
lib/builtins/CMakeFiles/clang_rt.hard_pic_armv7em_macho_embedded.dir/extendhfsf2.c.o.d
-o
lib/builtins/CMakeFiles/clang_rt.hard_pic_armv7em_macho_embedded.dir/extendhfsf2.c.o
  -c ./llvm/projects/compiler-rt/lib/builtins/extendhfsf2.c
clang-3.8: warning: argument unused during compilation:
'-mmacosx-version-min=10.5'
  %R11 = t2ADDri %SP, 28, pred:14, pred:%noreg, opt:%noreg; flags:
FrameSetup
Unsupported opcode for unwinding information
UNREACHABLE executed at ./llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1122!
0  clang-3.80x000102d2f7de
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1  clang-3.80x000102d31479
PrintStackTraceSignalHandler(void*) + 25
2  clang-3.80x000102d2da79 llvm::sys::RunSignalHandlers() +
425
3  clang-3.80x000102d317b9 SignalHandler(int) + 345
4  libsystem_platform.dylib 0x7fff8d26ff1a _sigtramp + 26
5  clang-3.80x000106afe59c guard variable for
shouldAddRequirement(clang::Module*, llvm::StringRef, bool&)::IOKitAVC + 110364
6  clang-3.80x000102d3149b raise + 27
7  clang-3.80x000102d31552 abort + 18
8  clang-3.80x000102c4ebf6
llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 198
9  clang-3.80x000100f539b7
llvm::ARMAsmPrinter::EmitUnwindingInstruction(llvm::MachineInstr const*) + 1799
10 clang-3.80x000100f5669f
llvm::ARMAsmPrinter::EmitInstruction(llvm::MachineInstr const*) + 287
11 clang-3.80x0001038bc0d3
llvm::AsmPrinter::EmitFunctionBody() + 1507
12 clang-3.80x000100f4d35d
llvm::ARMAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) + 605
13 clang-3.80x00010204639e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 110
14 clang-3.80x000102550c7d
llvm::FPPassManager::runOnFunction(llvm::Function&) + 413
15 clang-3.80x000102550fb5
llvm::FPPassManager::runOnModule(llvm::Module&) + 117
16 clang-3.80x000102551d0a (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&) + 2010
17 clang-3.80x00010255129b
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 347
18 clang-3.80x000102552951
llvm::legacy::PassManager::run(llvm::Module&) + 33
19 clang-3.80x000102ff0600 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
llvm::raw_pwrite_stream*) + 1904
20 clang-3.80x000102fef6a2
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 162
21 clang-3.80x0001032af931
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1505
22 clang-3.80x000104759d3f clang::ParseAST(clang::Sema&,
bool, bool) + 1295
23 clang-3.80x00010381395f
clang::ASTFrontendAction::ExecuteAction() + 511
24 clang-3.80x0001032adb57
clang::CodeGenAction::ExecuteAction() + 5991
25 clang-3.80x000103812ec0 clang::FrontendAction::Execute()
+ 112
26 clang-3.80x000103767628
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1592
27 clang-3.80x0001038a1d3a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4410
28 clang-3.80x000100b0244e cc1_main(llvm::ArrayRef, char const*, void*) + 4926
29 clang-3.80x000100af1fcf
ExecuteCC1Tool(llvm::ArrayRef, llvm::StringRef) + 479
30 clang-3.80x000100aefb2d main + 3245
31 libdyld.dylib0x7fff86ef45c9 start + 1
32 libdyld.d

[llvm-bugs] [Bug 25396] New: Unclear error message when loading PE executable on OS X

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25396

Bug ID: 25396
   Summary: Unclear error message when loading PE executable on OS
X
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: MacOS X
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-...@lists.llvm.org
  Reporter: whitequ...@whitequark.org
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

lldb currently says: "error: the platform is not currently connected".

This could be improved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25397] New: clang 3.7.0 segfaults during mpich3.1.4 compile

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25397

Bug ID: 25397
   Summary: clang 3.7.0 segfaults during mpich3.1.4 compile
   Product: clang
   Version: 3.7
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: cwsmit...@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 15214
  --> https://llvm.org/bugs/attachment.cgi?id=15214&action=edit
tarball with the following files:

clang 3.7.0 segfaults when compiling mpich3.1.4 
http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz

Mpich was configured with the following command:

../configure --disable-fortran
--prefix=/home/cwsmith/software/mpich-3.1.4/installClang370
--enable-threads=multiple CC=clang CXX=clang++ --enable-yield=sched_yield 

The files suggested for submission with the bug report by the diagnostic
message are attached.

Compilation failed with the following output:

  CC   src/mpi/pt2pt/lib_libmpi_la-greq_start.lo
../src/mpi/pt2pt/greq_start.c:239:62: error: alias must point to a defined
variable or function
MPIX_Grequest_class *greq_class)
__attribute__((weak,alias("MPIX_Grequest_class_create")));
 ^
0  libLLVM.so.3.7  0x7fdbdca92228
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  libLLVM.so.3.7  0x7fdbdca91041
2  libpthread.so.0 0x7fdbdc323d60
3  clang-3.7   0x00699256
clang::CodeGen::CodeGenModule::checkAliases() + 598
4  clang-3.7   0x006a4519 clang::CodeGen::CodeGenModule::Release()
+ 25
5  clang-3.7   0x0098370d
6  clang-3.7   0x00ab70d2 clang::ParseAST(clang::Sema&, bool, bool)
+ 802
7  clang-3.7   0x00908b06 clang::FrontendAction::Execute() + 502
8  clang-3.7   0x008e2e79
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 313
9  clang-3.7   0x00982624
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1940
10 clang-3.7   0x00652958 cc1_main(llvm::ArrayRef,
char const*, void*) + 2280
11 clang-3.7   0x0064db7b main + 1003
12 libc.so.6   0x7fdbdb9f7610 __libc_start_main + 240
13 clang-3.7   0x00650839 _start + 41
Stack dump:
0.Program arguments: /usr/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name greq_start.c -mrelocation-model pic -pic-level 2 -mthread-model
posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -coverage-file
/home/cwsmith/software/mpich-3.1.4/buildClang370/src/mpi/pt2pt/.libs/lib_libmpi_la-greq_start.o
-resource-dir /usr/bin/../lib/clang/3.7.0 -dependency-file
src/mpi/pt2pt/.deps/lib_libmpi_la-greq_start.Tpo -sys-header-deps -MP -MT
src/mpi/pt2pt/lib_libmpi_la-greq_start.lo -D HAVE_CONFIG_H -D _REENTRANT -D PIC
-I . -I .. -I ./src/include -I ../src/include -I ../src/mpi/datatype -I
../src/mpi/spawn -I src/util/logging/common -I ../src/util/wrappers -I
./src/util/wrappers -I ./src/binding/cxx -I ../src/mpid/ch3/include -I
./src/mpid/ch3/include -I ../src/mpid/ch3/channels/nemesis/include -I
./src/mpid/ch3/channels/nemesis/include -I
../src/mpid/ch3/channels/nemesis/utils/monitor -I ../src/mpid/common/datatype
-I ../src/mpid/common/datatype -I ../src/mpid/common/sched -I
../src/mpid/common/thread -I ../src/pmi/simple -I
/home/cwsmith/software/mpich-3.1.4/buildClang370/src/mpl/include -I
/home/cwsmith/software/mpich-3.1.4/src/mpl/include -I
/home/cwsmith/software/mpich-3.1.4/src/openpa/src -I
/home/cwsmith/software/mpich-3.1.4/buildClang370/src/openpa/src -I
/home/cwsmith/software/mpich-3.1.4/buildClang370/src/mpi/romio/include
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.7.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir
/home/cwsmith/software/mpich-3.1.4/buildClang370 -ferror-limit 19
-fmessage-length 211 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o src/mpi/pt2pt/.libs/lib_libmpi_la-greq_start.o -x c
../src/mpi/pt2pt/greq_start.c 
1. parser at end of file
2.Per-file LLVM IR generation
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25398] New: WinEH funclet entries/exits "kill" volatile registers

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25398

Bug ID: 25398
   Summary: WinEH funclet entries/exits "kill" volatile registers
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: Register Allocator
  Assignee: unassignedb...@nondot.org
  Reporter: jctremou...@gmail.com
CC: llvm-bugs@lists.llvm.org
Classification: Unclassified

Created attachment 15215
  --> https://llvm.org/bugs/attachment.cgi?id=15215&action=edit
File that miscompiles (64-bit, with -code-model=large)

The rules around WinEH funclets need to be correctly modeled in the register
allocator:
 - On entry to a funclet, all registers may be trashed
 - On exit from a funclet, volatile registers may be trashed, and nonvolatile
registers will be restored *to the value they had just prior to the exception*

32-bit WinEH has a workaround that just models calls which may transition to
funclets as killing all registers, which is conservatively correct.
64-bit WinEH does not (yet?) have such a workaround, which could lead to
miscompiles, as in the attached bad_regalloc.ll (which needs -code-model=large
to expose the bug, and tries to hold the call target in rsi across a funclet
entry where it may be trashed).

While the workaround is conservatively correct, it imposes a rather severe
penalty on the non-exceptional path around exceptional constructs, so the real
work here is to find a correct, less conservative solution.

A good first step would be modeling the kills as happening on the exceptional
path out of the invoke but not the normal path out of it.  This requires
modeling them as occurring on the unsplittable edge or, equivalently, modeling
them with some operator at the start of the funclet entry block *which is glued
to the top of the block* -- the RA needs to know that it cannot insert spills
after the edge and before the kill, which IIUC is a novel constraint for LLVM's
RA.

A good second step would be to recognize when the only appearance of some
nonvolatile register in a function is its apparent kill at one of these funclet
boundaries, and suppress the save/restore that would otherwise be inserted to
preserve its value for the current function's caller, since the runtime will
already restore its value on exit from the funclet.

A third step would be to take advantage of the runtime's restoring of these
values on funclet exit, enregistering candidates across entire catch handlers
when those candidates are not modified within the handler.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 25202] unrecognized reloc 23

2015-11-03 Thread via llvm-bugs
https://llvm.org/bugs/show_bug.cgi?id=25202

İsmail Dönmez  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from İsmail Dönmez  ---
TLS relocations seems to work with trunk now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs