Skip to content

Commit

Permalink
Merged master:409350deeaf into amd-gfx:9b5c6e5fe65
Browse files Browse the repository at this point in the history
Local branch amd-gfx 9b5c6e5 Merged master:057626b4393 into amd-gfx:b253b7e85b8
Remote branch master 409350d Revert "[LiveDebugValues] Introduce entry values of unmodified params"
  • Loading branch information
Sw authored and Sw committed Dec 3, 2019
2 parents 9b5c6e5 + 409350d commit 6a1ebdb
Show file tree
Hide file tree
Showing 58 changed files with 4,246 additions and 5,232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def main():
InsertHeaderToVimBuffer(include_fixer_context, text)
print("Added #include {0} for {1}.".format(selected, symbol))
except Exception as error:
print(error.message, file=sys.stderr)
print(error, file=sys.stderr)
return


Expand Down
3 changes: 2 additions & 1 deletion clang/lib/Sema/SemaLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ static void InsertOCLBuiltinDeclarationsFromTable(Sema &S, LookupResult &LR,
NewOpenCLBuiltin->addAttr(ConstAttr::CreateImplicit(Context));
if (OpenCLBuiltin.IsConv)
NewOpenCLBuiltin->addAttr(ConvergentAttr::CreateImplicit(Context));
if ((GenTypeMaxCnt > 1 || Len > 1) && !S.getLangOpts().OpenCLCPlusPlus)

if (!S.getLangOpts().OpenCLCPlusPlus)
NewOpenCLBuiltin->addAttr(OverloadableAttr::CreateImplicit(Context));

LR.addDecl(NewOpenCLBuiltin);
Expand Down
5 changes: 4 additions & 1 deletion clang/test/CodeGen/arm-neon-vcadd.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// RUN: %clang -target arm-arm-none-eabi -march=armv8.3-a+fp16 %s -S -emit-llvm -o - | opt -S -sroa | FileCheck %s
// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv8.3a-arm-none-eabi -target-cpu generic \
// RUN: -target-feature +fullfp16 -mfloat-abi soft -S -emit-llvm -o - %s | \
// RUN: opt -S -sroa -o - | FileCheck %s

#include <arm_neon.h>

Expand Down
7 changes: 7 additions & 0 deletions clang/test/CodeGenOpenCL/fdeclare-opencl-builtins.cl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ kernel void test_pure_attr(read_only image1d_t img) {
float4 resf = read_imagef(img, 42);
}

// Test that builtins with only one prototype are mangled.
// CHECK-LABEL: @test_mangling
// CHECK: call i32 @_Z12get_local_idj
kernel void test_mangling() {
size_t lid = get_local_id(0);
}

// CHECK: attributes [[ATTR_CONST]] =
// CHECK-SAME: readnone
// CHECK: attributes [[ATTR_PURE]] =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"""
Tests navigating in the multiline expression editor.
"""

import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test.lldbpexpect import PExpectTest

class TestCase(PExpectTest):

mydir = TestBase.compute_mydir(__file__)

arrow_up = "\033[A"
arrow_down = "\033[B"

# PExpect uses many timeouts internally and doesn't play well
# under ASAN on a loaded machine..
@skipIfAsan
def test_nav_arrow_up(self):
"""Tests that we can navigate back to the previous line with the up arrow"""
self.launch()

# Start multiline expression mode by just running 'expr'
self.child.sendline("expr")
self.child.expect_exact("terminate with an empty line to evaluate")
# Create a simple integer expression '123' and press enter.
self.child.send("123\n")
# We should see the prompt for the second line of our expression.
self.child.expect_exact("2: ")
# Go back to the first line and change 123 to 124.
# Then press enter twice to evaluate our expression.
self.child.send(self.arrow_up + "\b4\n\n")
# The result of our expression should be 124 (our edited expression)
# and not 123 (the one we initially typed).
self.child.expect_exact("(int) $0 = 124")

self.quit()

@skipIfAsan
def test_nav_arrow_down(self):
"""Tests that we can navigate to the next line with the down arrow"""
self.launch()

# Start multiline expression mode by just running 'expr'
self.child.sendline("expr")
self.child.expect_exact("terminate with an empty line to evaluate")
# Create a simple integer expression '111' and press enter.
self.child.send("111\n")
# We should see the prompt for the second line of our expression.
self.child.expect_exact("2: ")
# Create another simple integer expression '222'.
self.child.send("222")
# Go back to the first line and change '111' to '111+' to make
# an addition operation that spans two lines. We need to go up to
# test that we can go back down again.
self.child.send(self.arrow_up + "+")
# Go back down to our second line and change '222' to '223'
# so that the full expression is now '111+\n223'.
# Then press enter twice to evaluate the expression.
self.child.send(self.arrow_down + "\b3\n\n")
# The result of our expression '111 + 223' should be '334'.
# If the expression is '333' then arrow down failed to get
# us back to the second line.
self.child.expect_exact("(int) $0 = 334")

self.quit()
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
supported_platforms.extend(lldbplatformutil.getDarwinOSTriples())

lldbinline.MakeInlineTest(__file__, globals(),
[decorators.skipUnlessPlatform(supported_platforms),
[decorators.skipIf(bugnumber="llvm.org/pr44059"),
decorators.skipUnlessPlatform(supported_platforms),
decorators.skipIf(compiler="clang", compiler_version=['<', '10.0']),
decorators.skipUnlessArch('x86_64'),
decorators.skipUnlessHasCallSiteInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ template<typename T> __attribute__((noinline)) void use(T x) {
/* Clobbers */ : "rsi" \
);

// Destroy %rbx in the current frame.
#define DESTROY_RBX \
asm volatile ("xorq %%rbx, %%rbx" \
/* Outputs */ : \
/* Inputs */ : \
/* Clobbers */ : "rbx" \
);

struct S1 {
int field1 = 123;
int *field2 = &field1;
Expand All @@ -38,17 +30,10 @@ void func1(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

// NOTE: Currently, we do not generate DW_OP_entry_value for the 'x',
// since it gets copied into a register that is not callee saved,
// and we can not guarantee that its value has not changed.
//% self.filecheck("image lookup -va $pc", "main.cpp", "-check-prefix=FUNC1-DESC")
// FUNC1-DESC: name = "x", type = "int", location = DW_OP_entry_value(DW_OP_reg4 RSI)

++sink;

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("image lookup -va $pc", "main.cpp", "-check-prefix=FUNC1-DESC")
// FUNC1-DESC: name = "sink", type = "int &", location = DW_OP_entry_value(DW_OP_reg5 RDI)
}

__attribute__((noinline))
Expand All @@ -58,16 +43,10 @@ void func2(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC2-EXPR-FAIL", expect_cmd_failure=True)
// FUNC2-EXPR-FAIL: couldn't get the value of variable x: variable not available
//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC2-EXPR")
// FUNC2-EXPR: (int) ${{.*}} = 123

++sink;

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC2-EXPR")
// FUNC2-EXPR: ${{.*}} = 2
}

__attribute__((noinline))
Expand All @@ -90,16 +69,10 @@ void func4_amb(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC4-EXPR-FAIL", expect_cmd_failure=True)
// FUNC4-EXPR-FAIL: couldn't get the value of variable x: variable not available
//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC4-EXPR", expect_cmd_failure=True)
// FUNC4-EXPR: couldn't get the value of variable x: Could not evaluate DW_OP_entry_value.

++sink;

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC4-EXPR", expect_cmd_failure=True)
// FUNC4-EXPR: couldn't get the value of variable sink: Could not evaluate DW_OP_entry_value.
}

__attribute__((noinline))
Expand All @@ -125,16 +98,10 @@ void func7(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC7-EXPR-FAIL", expect_cmd_failure=True)
// FUNC7-EXPR-FAIL: couldn't get the value of variable x: variable not available
//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC7-EXPR")
// FUNC7-EXPR: (int) ${{.*}} = 123

++sink;

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC7-EXPR")
// FUNC7-EXPR: ${{.*}} = 4
}

__attribute__((always_inline))
Expand Down Expand Up @@ -162,16 +129,10 @@ void func11_tailcalled(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC11-EXPR-FAIL", expect_cmd_failure=True)
// FUNC11-EXPR-FAIL: couldn't get the value of variable x: variable not available
//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC11-EXPR")
// FUNC11-EXPR: (int) ${{.*}} = 123

++sink;

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC11-EXPR")
// FUNC11-EXPR: ${{.*}} = 5
}

__attribute__((noinline))
Expand All @@ -189,16 +150,10 @@ void func13(int &sink, int x) {
// Destroy 'x' in the current frame.
DESTROY_RSI;

//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC13-EXPR-FAIL", expect_cmd_failure=True)
// FUNC13-EXPR-FAIL: couldn't get the value of variable x: variable not available

use(sink);
//% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC13-EXPR")
// FUNC13-EXPR: (int) ${{.*}} = 123

// Destroy 'sink' in the current frame.
DESTROY_RBX;

//% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC13-EXPR")
// FUNC13-EXPR: ${{.*}} = 5
++sink;
}

__attribute__((noinline, disable_tail_calls))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_with_python(self):
#self.assertTrue(in_float == return_float)

if not self.affected_by_radar_34562999() and not self.affected_by_pr44132():
self.return_and_test_struct_value("return_one_int")
self.return_and_test_struct_value("return_one_int")
self.return_and_test_struct_value("return_two_int")
self.return_and_test_struct_value("return_three_int")
self.return_and_test_struct_value("return_four_int")
Expand Down Expand Up @@ -185,12 +185,12 @@ def test_vector_values(self):

self.return_and_test_struct_value("return_vector_size_float32_8")
self.return_and_test_struct_value("return_vector_size_float32_16")
if not self.affected_by_pr44132():
self.return_and_test_struct_value("return_vector_size_float32_32")
if not self.affected_by_pr44132():
self.return_and_test_struct_value("return_vector_size_float32_32")
self.return_and_test_struct_value("return_ext_vector_size_float32_2")
self.return_and_test_struct_value("return_ext_vector_size_float32_4")
if not self.affected_by_pr44132():
self.return_and_test_struct_value("return_ext_vector_size_float32_8")
if not self.affected_by_pr44132():
self.return_and_test_struct_value("return_ext_vector_size_float32_8")

# limit the nested struct and class tests to only x86_64
@skipIf(archs=no_match(['x86_64']))
Expand Down
Loading

0 comments on commit 6a1ebdb

Please sign in to comment.