summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/XCore
AgeCommit message (Collapse)Author
2025-08-04XCore: Fix broken check lines in testMatt Arsenault
2025-07-26MC: Allocate initial fragment and define section symbol in changeSectionFangrui Song
Reland #150574 with a MCStreamer::changeSection change: In Mach-O, DWARF sections use Begin as a temporary label, requiring a label definition, unlike section symbols in other file formats. (Tested by dec978036ef1037753e7de5b78c978e71c49217b) --- 13a79bbfe583e1d8cc85d241b580907260065eb8 (2017) introduced fragment creation in MCContext for createELFSectionImpl, which was inappropriate. Fragments should only be created when using MCSteramer, not during `MCContext::get*Section` calls. `initMachOMCObjectFileInfo` defines multiple sections, some of which may not be used by the code generator. This caused symbol names matching these sections to be incorrectly marked as undefined (see https://reviews.llvm.org/D55173). The fragment code was later replicated in other file formats, such as WebAssembly (see https://reviews.llvm.org/D46561), XCOFF, and GOFF. This patch fixes the problem by moving initial fragment allocation from MCContext::createSection to MCStreamer::changeSection. While MCContext still creates a section symbol, the symbol is not attached to the initial fragment. In addition, * Move `emitLabel`/`setFragment` from `switchSection*` and overridden changeSection to `MCObjectStreamer::changeSection` for consistency. * De-virtualize `switchSectionNoPrint`. * test/CodeGen/XCore/section-name.ll now passes. XCore doesn't support MCObjectStreamer. I don't think the MCAsmStreamer output behavior change matters. Pull Request: https://github.com/llvm/llvm-project/pull/150574
2025-07-25Revert "MC: Allocate initial fragment and define section symbol in ↵dyung
changeSection" (#150736) Reverts llvm/llvm-project#150574 This is causing a test failure on AArch64 MacOS bots: https://lab.llvm.org/buildbot/#/builders/190/builds/24187
2025-07-24MC: Allocate initial fragment and define section symbol in changeSectionFangrui Song
13a79bbfe583e1d8cc85d241b580907260065eb8 (2017) introduced fragment creation in MCContext for createELFSectionImpl, which was inappropriate. Fragments should only be created when using MCSteramer, not during `MCContext::get*Section` calls. `initMachOMCObjectFileInfo` defines multiple sections, some of which may not be used by the code generator. This caused symbol names matching these sections to be incorrectly marked as undefined (see https://reviews.llvm.org/D55173). The fragment code was later replicated in other file formats, such as WebAssembly (see https://reviews.llvm.org/D46561), XCOFF, and GOFF. This patch fixes the problem by moving initial fragment allocation from MCContext::createSection to MCStreamer::changeSection. While MCContext still creates a section symbol, the symbol is not attached to the initial fragment. In addition, move `emitLabel`/`setFragment` from `switchSection*` and overridden changeSection to `MCObjectStreamer::changeSection` for consistency. * test/CodeGen/XCore/section-name.ll now passes. XCore doesn't support MCObjectStreamer. I don't think the MCAsmStreamer output behavior change matters. Pull Request: https://github.com/llvm/llvm-project/pull/150574
2025-07-22Fix Windows EH IP2State tables (remove +1 bias) (#144745)sivadeilra
This changes how LLVM constructs certain data structures that relate to exception handling (EH) on Windows. Specifically this changes how IP2State tables for functions are constructed. The purpose of this change is to align LLVM to the requires of the Windows AMD64 ABI, which requires that the IP2State table entries point to the boundaries between instructions. On most Windows platforms (AMD64, ARM64, ARM32, IA64, but *not* x86-32), exception handling works by looking up instruction pointers in lookup tables. These lookup tables are stored in `.xdata` sections in executables. One element of the lookup tables are the `IP2State` tables (Instruction Pointer to State). If a function has any instructions that require cleanup during exception unwinding, then it will have an IP2State table. Each entry in the IP2State table describes a range of bytes in the function's instruction stream, and associates an "EH state number" with that range of instructions. A value of -1 means "the null state", which does not require any code to execute. A value other than -1 is an index into the State table. The entries in the IP2State table contain byte offsets within the instruction stream of the function. The Windows ABI requires that these offsets are aligned to instruction boundaries; they are not permitted to point to a byte that is not the first byte of an instruction. Unfortunately, CALL instructions present a problem during unwinding. CALL instructions push the address of the instruction after the CALL instruction, so that execution can resume after the CALL. If the CALL is the last instruction within an IP2State region, then the return address (on the stack) points to the *next* IP2State region. This means that the unwinder will use the wrong cleanup funclet during unwinding. To fix this problem, compilers should insert a NOP after a CALL instruction, if the CALL instruction is the last instruction within an IP2State region. The NOP is placed within the same IP2State region as the CALL, so that the return address points to the NOP and the unwinder will locate the correct region. This PR modifies LLVM so that it inserts NOP instructions after CALL instructions, when needed. In performance tests, the NOP has no detectable significance. The NOP is rarely inserted, since it is only inserted when the CALL is the last instruction before an IP2State transition or the CALL is the last instruction before the function epilogue. NOP padding is only necessary on Windows AMD64 targets. On ARM64 and ARM32, instructions have a fixed size so the unwinder knows how to "back up" by one instruction. Interaction with Import Call Optimization (ICO): Import Call Optimization (ICO) is a compiler + OS feature on Windows which improves the performance and security of DLL imports. ICO relies on using a specific CALL idiom that can be replaced by the OS DLL loader. This removes a load and indirect CALL and replaces it with a single direct CALL. To achieve this, ICO also inserts NOPs after the CALL instruction. If the end of the CALL is aligned with an EH state transition, we *also* insert a single-byte NOP. **Both forms of NOPs must be preserved.** They cannot be combined into a single larger NOP; nor can the second NOP be removed. This is necessary because, if ICO is active and the call site is modified by the loader, the loader will end up overwriting the NOPs that were inserted for ICO. That means that those NOPs cannot be used for the correct termination of the exception handling region (the IP2State transition), so we still need an additional NOP instruction. The NOPs cannot be combined into a longer NOP (which is ordinarily desirable) because then ICO would split one instruction, producing a malformed instruction after the ICO call.
2025-07-15XCore: Add frexp intrinsic test (#148676)Matt Arsenault
2025-07-14XCore: Add test for sincos and exp10 intrinsics (#148621)Matt Arsenault
2025-06-11Introduce MCAsmInfo::UsesSetToEquateSymbol and prefer = to .setFangrui Song
Introduce MCAsmInfo::UsesSetToEquateSymbol to control the preferred syntax for symbol equating. We now favor the more readable and common `symbol = expression` syntax over `.set`. This aligns with pre- https://reviews.llvm.org/D44256 behavior. On Apple platforms, this resolves a clang -S vs -c behavior difference (resolves #104623). For targets whose = support is unconfirmed, UsesSetToEquateSymbol is set to false. This also minimizes test updates. Pull Request: https://github.com/llvm/llvm-project/pull/142289
2025-03-11Reland: [MC] output inlined-at debug info (#106230) (#130306)Yaxun (Sam) Liu
Reland https://github.com/llvm/llvm-project/pull/106230 The original PR was reverted due to compilation time regression. This PR fixed that by adding a condition OutStreamer->isVerboseAsm() to the generation of extra inlined-at debug info, so that it does not affect normal compilation time. Currently MC print source location of instructions in comments in assembly when debug info is available, however, it does not include inlined-at locations when a function is inlined. For example, function foo is defined in header file a.h and is called multiple times in b.cpp. If foo is inlined, current assembly will only show its instructions with their line numbers in a.h. With inlined-at locations, the assembly will also show where foo is called in b.cpp. This patch adds inlined-at locations to the comments by using DebugLoc::print. It makes the printed source location info consistent with those printed by machine passes.
2025-03-07Revert "[MC] output inlined-at debug info (#106230)"Nikita Popov
This reverts commit f3dc358953a13caf7521fc615a08f6317930351c. This causes a large compile-time regression: https://llvm-compile-time-tracker.com/compare.php?from=267403442264959f6b06e227ff450c385f4b3ef2&to=f3dc358953a13caf7521fc615a08f6317930351c&stat=instructions:u
2025-03-06[MC] output inlined-at debug info (#106230)Yaxun (Sam) Liu
Currently MC print source location of instructions in comments in assembly when debug info is available, however, it does not include inlined-at locations when a function is inlined. For example, function foo is defined in header file a.h and is called multiple times in b.cpp. If foo is inlined, current assembly will only show its instructions with their line numbers in a.h. With inlined-at locations, the assembly will also show where foo is called in b.cpp. This patch adds inlined-at locations to the comments by using DebugLoc::print. It makes the printed source location info consistent with those printed by machine passes.
2025-02-12[llvm] Remove `br i1 undef` in some `llvm/test/CodeGen` tests (#126811)Yeaseen
This PR replaces some instances of `br i1 undef` with function argument value in several tests under `llvm/test/CodeGen/` directory.
2024-12-15[XCore,test] Change llc -march= to -mtriple=Fangrui Song
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize xcore-apple-darwin as ELF instead of rejecting it outrightly.
2024-11-15[RuntimeLibCalls] Consistently disable unavailable libcalls (#116214)Nikita Popov
The logic for marking runtime libcalls unavailable currently duplicates essentially the same logic for some random subset of targets, where someone reported an issue and then someone went and fixed the issue for that specific target only. However, the availability for most of these is completely target independent. In particular: * MULO_I128 is never available in libgcc * Various I128 libcalls are not available for 32-bit targets in libgcc * powi is never available in MSVCRT Unify the logic for these, so we don't miss any targets. This fixes https://github.com/llvm/llvm-project/issues/16778 on AArch64, which is one of the targets that was previously missed in this logic.
2024-10-18[llvm] Consistently respect `naked` fn attribute in ↵Alex Rønne Petersen
`TargetFrameLowering::hasFP()` (#106014) Some targets (e.g. PPC and Hexagon) already did this. I think it's best to do this consistently so that frontend authors don't run into inconsistent results when they emit `naked` functions. For example, in Zig, we had to change our emit code to also set `frame-pointer=none` to get reliable results across targets. Note: I don't have commit access.
2024-02-05[CodeGen] Convert tests to opaque pointers (NFC)Nikita Popov
2023-12-05[XCore] Set MaxAtomicSizeInBitsSupported to 0 (#74389)James Y Knight
XCore does not appear to have any support for atomicrmw or cmpxchg. This will result in all atomic operations getting expanded to __atomic_* libcalls via AtomicExpandPass, which matches what Clang already does in the frontend. Additionally, remove the code which handles atomic load/store, as it will no longer be used.
2023-11-08[RegScavenger] Simplify state tracking for backwards scavenging (#71202)Jay Foad
Track the live register state immediately before, instead of after, MBBI. This makes it simple to track the state at the start or end of a basic block without a separate (and poorly named) Tracking flag. This changes the API of the backward(MachineBasicBlock::iterator I) method, which now recedes to the state just before, instead of just after, *I. Some clients are simplified by this change. There is one small functional change shown in the lit tests where multiple spilled registers all need to be reloaded before the same instruction. The reloads will now be inserted in the opposite order. This should not affect correctness.
2023-09-11[test] Change llc -march= to -mtriple=Fangrui Song
The issue is uncovered by #47698: for IR files without a target triple, -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
2023-05-18[XCore] Use backwards scavenging in frame index eliminationJay Foad
This is preferred because it does not rely on accurate kill flags. Differential Revision: https://reviews.llvm.org/D150673
2023-05-17[NFC][Py Reformat] Reformat lit.local.cfg python files in llvmTobias Hieta
This is a follow-up to b71edfaa4ec3c998aadb35255ce2f60bba2940b0 since I forgot the lit.local.cfg files in that one. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: barannikov88, kwk Differential Revision: https://reviews.llvm.org/D150762
2023-02-15[XCore] Adapt threads.ll to opaque pointers.Nigel Perks
Differential Revision: https://reviews.llvm.org/D144085
2023-01-18[AsmParser] Remove typed pointer auto-detectionNikita Popov
IR is now always parsed in opaque pointer mode, unless -opaque-pointers=0 is explicitly given. There is no automatic detection of typed pointers anymore. The -opaque-pointers=0 option is added to any remaining IR tests that haven't been migrated yet. Differential Revision: https://reviews.llvm.org/D141912
2022-12-19[XCore] Convert some tests to opaque pointers (NFC)Nikita Popov
2022-12-05Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."Jonas Paulsson
This reverts commit 122efef8ee9be57055d204d52c38700fe933c033. - Patch fixed to not reuse definitions from predecessors in EH landing pads. - Late review suggestions (by MaskRay) have been addressed. - M68k/pipeline.ll test updated. - Init captures added in processBlock() to avoid capturing structured bindings. - RISCV has this disabled for now. Original commit message: A new pass MachineLateInstrsCleanup is added to be run after PEI. This is a simple pass that removes redundant and identical instructions whenever found by scanning the MF once while keeping track of register definitions in a map. These instructions are typically immediate loads resulting from rematerialization, and address loads emitted by target in eliminateFrameInde(). This is enabled by default, but a target could easily disable it by means of 'disablePass(&MachineLateInstrsCleanupID);'. This late cleanup is naturally not "optimal" in removing instructions as it is done by looking at phys-regs, but still quite effective. It would be desirable to improve other parts of CodeGen and avoid these redundant instructions in the first place, but there are no ideas for this yet. Differential Revision: https://reviews.llvm.org/D123394 Reviewed By: RKSimon, foad, craig.topper, arsenm, asb
2022-12-05Revert "Reapply "[CodeGen] Add new pass for late cleanup of redundant ↵Jonas Paulsson
definitions."" This reverts commit 17db0de330f943833296ae72e26fa988bba39cb3. Some more bots got broken - need to investigate.
2022-12-03Reapply "[CodeGen] Add new pass for late cleanup of redundant definitions."Jonas Paulsson
Init captures added in processBlock() to avoid capturing structured bindings, which caused the build problems (with clang). RISCV has this disabled for now until problems relating to post RA pseudo expansions are resolved.
2022-12-01Revert "[CodeGen] Add new pass for late cleanup of redundant definitions."Jonas Paulsson
Temporarily revert and fix buildbot failure. This reverts commit 6d12599fd4134c1da63198c74a25490d28c733f6.
2022-12-01[CodeGen] Add new pass for late cleanup of redundant definitions.Jonas Paulsson
A new pass MachineLateInstrsCleanup is added to be run after PEI. This is a simple pass that removes redundant and identical instructions whenever found by scanning the MF once while keeping track of register definitions in a map. These instructions are typically immediate loads resulting from rematerialization, and address loads emitted by target in eliminateFrameInde(). This is enabled by default, but a target could easily disable it by means of 'disablePass(&MachineLateInstrsCleanupID);'. This late cleanup is naturally not "optimal" in removing instructions as it is done by looking at phys-regs, but still quite effective. It would be desirable to improve other parts of CodeGen and avoid these redundant instructions in the first place, but there are no ideas for this yet. Differential Revision: https://reviews.llvm.org/D123394 Reviewed By: RKSimon, foad, craig.topper, arsenm, asb
2022-11-01XCore: Register null MCTargetStreamerMatt Arsenault
Fixes null dereference when printing globals
2022-08-24Fix CSR update checkMatthias Braun
D132080 introduced a bug leading to `RegisterClassInfo` caches not getting invalidated when there was exactly one more CSR register added. Differential Revision: https://reviews.llvm.org/D132606
2022-08-22RegisterClassInfo: Fix CSR cache invalidationMatthias Braun
`RegisterClassInfo` caches information like allocation orders and reuses it for multiple machine functions where possible. However the `MCPhysReg *CalleeSavedRegs` field used to test whether the set of callee saved registers changed did not work: After D28566 `MachineRegisterInfo::getCalleeSavedRegs()` can return dynamically computed CSR sets that are only valid while the `MachineRegisterInfo` object of the current function exists. This changes the code to make a copy of the CSR list instead of keeping a possibly invalid pointer around. Differential Revision: https://reviews.llvm.org/D132080
2022-02-18[CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC.Jay Foad
Take advantage of D117117 to simplify all {{\[}} to [ and {{\]}} to ]. Differential Revision: https://reviews.llvm.org/D117298
2022-01-06[Tests] Add elementtype attribute to indirect inline asm operands (NFC)Nikita Popov
This updates LLVM tests for D116531 by adding elementtype attributes to operands that correspond to indirect asm constraints.
2021-06-17Update @llvm.powi to handle different int sizes for the exponentBjorn Pettersson
This can be seen as a follow up to commit 0ee439b705e82a4fe20e2, that changed the second argument of __powidf2, __powisf2 and __powitf2 in compiler-rt from si_int to int. That was to align with how those runtimes are defined in libgcc. One thing that seem to have been missing in that patch was to make sure that the rest of LLVM also handle that the argument now depends on the size of int (not using the si_int machine mode for 32-bit). When using __builtin_powi for a target with 16-bit int clang crashed. And when emitting libcalls to those rtlib functions, typically when lowering @llvm.powi), the backend would always prepare the exponent argument as an i32 which caused miscompiles when the rtlib was compiled with 16-bit int. The solution used here is to use an overloaded type for the second argument in @llvm.powi. This way clang can use the "correct" type when lowering __builtin_powi, and then later when emitting the libcall it is assumed that the type used in @llvm.powi matches the rtlib function. One thing that needed some extra attention was that when vectorizing calls several passes did not support that several arguments could be overloaded in the intrinsics. This patch allows overload of a scalar operand by adding hasVectorInstrinsicOverloadedScalarOpd, with an entry for powi. Differential Revision: https://reviews.llvm.org/D99439
2021-03-09[CodeGen] Report a normal instead of fatal error for label redefinitionJohn Brawn
A symbol being redefined as a label is something that can happen as a result of ordinary input, so it shouldn't cause a fatal error. Also adjust the error message to match the one you get when a symbol is redefined as a variable. Differential Revision: https://reviews.llvm.org/D98181
2021-03-01[Diagnose] Unify MCContext and LLVMContext diagnosingYuanfang Chen
The situation with inline asm/MC error reporting is kind of messy at the moment. The errors from MC layout are not reliably propagated and users have to specify an inlineasm handler separately to get inlineasm diagnose. The latter issue is not a correctness issue but could be improved. * Kill LLVMContext inlineasm diagnose handler and migrate it to use DiagnoseInfo/DiagnoseHandler. * Introduce `DiagnoseInfoSrcMgr` to diagnose SourceMgr backed errors. This covers use cases like inlineasm, MC, and any clients using SourceMgr. * Move AsmPrinter::SrcMgrDiagInfo and its instance to MCContext. The next step is to combine MCContext::SrcMgr and MCContext::InlineSrcMgr because in all use cases, only one of them is used. * If LLVMContext is available, let MCContext uses LLVMContext's diagnose handler; if LLVMContext is not available, MCContext uses its own default diagnose handler which just prints SMDiagnostic. * Change a few clients(Clang, llc, lldb) to use the new way of reporting. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D97449
2020-12-30[test] Add explicit dso_local to definitions in ELF static relocation model ↵Fangrui Song
tests
2020-12-20MCContext::reportError: don't call report_fatal_errorFangrui Song
Errors from MCAssembler, MCObjectStreamer and *ObjectWriter typically cause a crash: ``` % cat c.c int bar; extern int foo __attribute__((alias("bar"))); % clang -c -fcommon c.c fatal error: error in backend: Common symbol 'bar' cannot be used in assignment expr PLEASE submit a bug report to ... Stack dump: ... ``` `LLVMTargetMachine::addPassesToEmitFile` constructs `MachineModuleInfoWrapperPass` which creates a MCContext without SourceMgr. `MCContext::reportError` calls `report_fatal_error` which gets captured by Clang `LLVMErrorHandler` and gets translated to the output above. Since `MCContext::reportError` errors indicate user errors, such a crashing style error is inappropriate. So this patch changes `report_fatal_error` to `SourceMgr().PrintMessage`. ``` % clang -c -fcommon c.c <unknown>:0: error: Common symbol 'bar' cannot be used in assignment expr ``` Ideally we should at least recover the original filename (the line information is generally lost). That requires general improvement to MC diagnostics, because currently in many cases SMLoc information is lost.
2020-12-16Fix XCore test on Windows, the register order is reversed, for reasons unknownReid Kleckner
2020-12-04[TargetMachine] Don't imply dso_local on global variable declarations in ↵Fangrui Song
Reloc::Static model clang/lib/CodeGen/CodeGenModule sets dso_local on applicable global variables, we don't need to duplicate the work in TargetMachine:shouldAssumeDSOLocal. (Actually the long-term goal (started by r324535) is to remove as much additional implied dso_local in TargetMachine:shouldAssumeDSOLocal as possible.) By not implying dso_local, we will respect dso_local/dso_preemptable specifiers set by the frontend. This allows the proposed -fno-direct-access-external-data option to work with -fno-pic and prevent copy relocations. This patch should be NFC in terms of the Clang behavior because the case we don't set dso_local is a case Clang sets dso_local. However, some tests don't set dso_local on some `external global` and expose some differences. Most tests have been fixed to be more robust in previous commits.
2020-12-04[test] Add explicit dso_local to constant/global variable declarationsFangrui Song
They are currently implicit because TargetMachine::shouldAssumeDSOLocal implies dso_local. For external data, clang -fno-pic emits the dso_local specifier for ELF and non-MinGW COFF. Adding explicit dso_local makes these tests in align with the clang behavior and helps implementing an option to use GOT indirection for external data access in -fno-pic mode (to avoid copy relocations).
2020-11-20OpaquePtr: Bulk update tests to use typed byvalMatt Arsenault
Upgrade of the IR text tests should be the only thing blocking making typed byval mandatory. Partially done through regex and partially manual.
2020-02-21[XCore] Add instruction pattern for bitrevJim Lin
Summary: Add support for lowering bitreverse to the bitrev instruction. Fix https://bugs.llvm.org/show_bug.cgi?id=34628. Reviewers: RKSimon, rtrieu, robertlytton Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74748
2020-02-13Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of ↵Yuanfang Chen
`exit`""" This reverts commit 80a34ae31125aa46dcad47162ba45b152aed968d with fixes. Previously, since bots turning on EXPENSIVE_CHECKS are essentially turning on MachineVerifierPass by default on X86 and the fact that inline-asm-avx-v-constraint-32bit.ll and inline-asm-avx512vl-v-constraint-32bit.ll are not expected to generate functioning machine code, this would go down to `report_fatal_error` in MachineVerifierPass. Here passing `-verify-machineinstrs=0` to make the intent explicit.
2020-02-13Revert "Revert "Revert "Reland "[Support] make report_fatal_error `abort` ↵Yuanfang Chen
instead of `exit`"""" This reverts commit bb51d243308dbcc9a8c73180ae7b9e47b98e68fb.
2020-02-13Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of ↵Yuanfang Chen
`exit`""" This reverts commit 80a34ae31125aa46dcad47162ba45b152aed968d with fixes. On bots llvm-clang-x86_64-expensive-checks-ubuntu and llvm-clang-x86_64-expensive-checks-debian only, llc returns 0 for these two tests unexpectedly. I tweaked the RUN line a little bit in the hope that LIT is the culprit since this change is not in the codepath these tests are testing. llvm\test\CodeGen\X86\inline-asm-avx-v-constraint-32bit.ll llvm\test\CodeGen\X86\inline-asm-avx512vl-v-constraint-32bit.ll
2020-02-11Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""Yuanfang Chen
This reverts commit rGcd5b308b828e, rGcd5b308b828e, rG8cedf0e2994c. There are issues to be investigated for polly bots and bots turning on EXPENSIVE_CHECKS.
2020-02-11Reland "[Support] make report_fatal_error `abort` instead of `exit`"Yuanfang Chen
Summary: Reland D67847 after D73742 is committed. Replace `sys::Process::Exit(1)` with `abort` in `report_fatal_error`. After this patch, for tools turning on `CrashRecoveryContext`, crash handler installed by `CrashRecoveryContext` is called unless they installed a non-returning handler using `llvm::install_fatal_error_handler` like `cc1_main` currently does. Reviewers: rnk, MaskRay, aganea, hans, espindola, jhenderson Subscribers: jholewinski, qcolombet, dschuff, jyknight, emaste, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, rupprecht, jocewei, jsji, Jim, dmgreen, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74456
2020-01-15Revert "[Support] make report_fatal_error `abort` instead of `exit`"Yuanfang Chen
This reverts commit 647c3f4e47de8a850ffcaa897db68702d8d2459a. Got bots failure from sanitizer-windows and maybe others.