From patchwork Tue Oct 10 04:13:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 15130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2266905vqo; Mon, 9 Oct 2023 21:14:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeTEVq3gpF9lSKMVWLjqlLxWnX2RHazYRYXeEs+puO5T8FEgeat3lGmasqtWEgP2IY+kep X-Received: by 2002:a05:6512:2356:b0:4fb:8f79:631 with SMTP id p22-20020a056512235600b004fb8f790631mr16480994lfu.46.1696911262783; Mon, 09 Oct 2023 21:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696911262; cv=none; d=google.com; s=arc-20160816; b=01uN8bmPAaUNoYL4LYCf3e2TCYgFZT5g1SK6wp/Xs7Y8NvCGBCrPJ5miw0PagRxxj1 v/wXy7WZfvLoB7+2X58nK1TcxGtoj9fUakhm83RoVkaACRTFdVYQVeQUnJrAkfEGTWNS FBaT+N7D/xvc68q+SrxsdMeEdRtixbKzy5BxHj00nIDRaXpMnnSJ+pjJO3ZD1tKHv56v fNZ7C6JmQ+NHUyT8U5OeBOxPmE+3WXmtEjivvOMOkThWuZOwq25h6fSSA8p8t45b5gjq sMkd6xHny2cZJboWf9mnKfOtIPAs9YFCfQVsdvUnpreWk7qYVLh6ncAuTL5wCpHc7fuh NckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=syGbnwp7LDiOBdKJiTwRyIsIkg98890cOtkCB67vHl8=; fh=hYw4WVvbnGj9/5/VGsYiJWAkyy+A1DRahLUZMdPPjHw=; b=N+yjGu/sg+QCX6Lx+i7ITL+X9BGc8/7rsBtj5K2Tmh9wfNeKDUMNRrGlEbxGuP8jii ziV5Ruv/BdaQBPCnkF7Po4LOGAiucuft2+1SySXsoMeHEBM7Fu9Fp4WBEX+HCtIcn5xP VnFiQtfWZNtMPxH+d1p7WTw250RKGWMILax6kPlTdjb6uftlGDPvrcObpybc3DId6ckx XiiHv/hiHVMOjj+dRDhpHZ+TMDWJxNFsoJSpmWOD4j/rb03bo3XOFdTr77UIgHiEdGK7 5rTylYdvgK70PUiP5fOxEFNjOzVPDLt4g24W8lVhfBBrbK9vGWrTnjJoqsgb9e00C5Lv Ff5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=P75KLY95; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id o22-20020aa7d3d6000000b00534777419ddsi5146979edr.319.2023.10.09.21.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 21:14:22 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=P75KLY95; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39DE43858C39 for ; Tue, 10 Oct 2023 04:13:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id B1F123858D35 for ; Tue, 10 Oct 2023 04:13:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1F123858D35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1bdf4752c3cso31271295ad.2 for ; Mon, 09 Oct 2023 21:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1696911192; x=1697515992; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=syGbnwp7LDiOBdKJiTwRyIsIkg98890cOtkCB67vHl8=; b=P75KLY95nLK+HeR98juCyM5bAMUBSF9ylsYX/2SrpitQABmRePMiZlvGU5BxH5x7/k EbS8iPoX/BS8d/6wgUQXmAsLgHoa2M7TVOGsypdmQdfaqoHBkO1k8dTc1Hr23hmkYG29 AW9aOfnnvOWUX6ue3OADgA3q7AUdt7HNhx9cbjRcu++zLHRlt8I6aSE3c5anqbvighD/ m6L4l22/H3F6K14+UVmQ3UzT9PXgyhLqJLK5WT+QOIp+RnNo7/73qh+128P1EVONGBW/ d3lM8cbXwRtBkF6gKdDL+5WEEaTzRidXneNpTKxGjR/WHY1Vec+UinhG1dJbA9OcajXu 0JUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696911192; x=1697515992; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=syGbnwp7LDiOBdKJiTwRyIsIkg98890cOtkCB67vHl8=; b=ZNm8/v3R2jXrTN+Y8dc74+GPyHdwFDZYM+6NBHkouSq93QPPxEtd8kf9DYcRMyYgj7 Nb6thk6olKR998KwBhpSuAyQOYqu6t/79CRndjJceVrJDSEyFzbK9ylXisXQVP3rPFcZ hsvRKOxGf+iKa+itw+raFaz8jAyl5715oWNhI2K9Vl0bDw+AzmTmu+xA13mJqCXVZka3 exrhQx3OX+529+kHirHDmf7kF74BcV5YgkTiUJwJUCrEZyXBf04fpZwnCsslx8SvzabO /HOoozsitR3CxgdxQqxUPWm8QDtu2pqBmnxX79hCuyLLyvyz1KIlJ9RbCjfmqoI5VqMA YbEg== X-Gm-Message-State: AOJu0YxUZvENufkSBn2jP/g+r4h244XPlPrSgv89006jtehDJnjXdL1L 3yvteTlaNp56S1JEfvzNvPzcyEnOTtn/mOfY0qSSAxk0H8ZiHA+3evbGpcOaQ7THpe7FidQNKh5 1RUf3EWlwiZLgPt3uoTwJpMEUOEUGTGbL7WsSu/gYyTSBXZvfR3mFib2MSten6pMe7Y3bPpkU9z hzis6/9A== X-Received: by 2002:a17:902:a983:b0:1c7:2697:ec09 with SMTP id bh3-20020a170902a98300b001c72697ec09mr12735850plb.59.1696911191736; Mon, 09 Oct 2023 21:13:11 -0700 (PDT) Received: from SiX1E.. ([12.44.202.61]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ab8c00b001c444106bcasm10501093plr.46.2023.10.09.21.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 21:13:11 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, palmer@dabbelt.com, jeffreyalaw@gmail.com, rdapp@ventanamicro.com, juzhe.zhong@rivai.ai Subject: [PATCH v2 0/4] RISC-V target attribute Date: Mon, 9 Oct 2023 21:13:01 -0700 Message-Id: <20231010041305.9111-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779340424250706902 X-GMAIL-MSGID: 1779340424250706902 This patch set implement target attribute for RISC-V target, which is similar to other target like x86 or ARM, let user able to set some local setting per function without changing global settings. We support arch, tune and cpu first, and we will support other target attribute later, this version DOES NOT include multi-version function support yet, that is future work, probably work for GCC 15. The full proposal is put in RISC-V C-API document[1], which has discussed with RISC-V LLVM community, so we have consistent syntax and semantics. [1] https://github.com/riscv-non-isa/riscv-c-api-doc/pull/35 v2 changelog: - Resolve awk multi-dimensional issue. - Tweak code format - Tweak testcases